/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};

/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {

/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId])
/******/ 			return installedModules[moduleId].exports;

/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			exports: {},
/******/ 			id: moduleId,
/******/ 			loaded: false
/******/ 		};

/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;

/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}


/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;

/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;

/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";

/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {

	module.exports = __webpack_require__(1);


/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-18
	 * generated by script index file to require all modules in draw2d and gef
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	  
	    __webpack_require__(3),
	    
	    __webpack_require__(107),
	    
	    __webpack_require__(8),
	    
	    __webpack_require__(5),
	    
	    __webpack_require__(12),
	    
	    __webpack_require__(10),
	    
	    __webpack_require__(9),
	    
	    __webpack_require__(14),
	    
	    __webpack_require__(13),
	    
	    __webpack_require__(15),
	    
	    __webpack_require__(16),
	    
	    __webpack_require__(17),
	    
	    __webpack_require__(18),
	    
	    __webpack_require__(11),
	    
	    __webpack_require__(19),
	    
	    __webpack_require__(21),
	    
	    __webpack_require__(22),
	    
	    __webpack_require__(23),
	    
	    __webpack_require__(24),
	    
	    __webpack_require__(37),
	    
	    __webpack_require__(38),
	    
	    __webpack_require__(39),
	    
	    __webpack_require__(40),
	    
	    __webpack_require__(41),
	    
	    __webpack_require__(42),
	    
	    __webpack_require__(43),
	    
	    __webpack_require__(44),
	    
	    __webpack_require__(45),
	    
	    __webpack_require__(20),
	    
	    __webpack_require__(27),
	    
	    __webpack_require__(32),
	    
	    __webpack_require__(25),
	    
	    __webpack_require__(46),
	    
	    __webpack_require__(48),
	    
	    __webpack_require__(49),
	    
	    __webpack_require__(51),
	    
	    __webpack_require__(52),
	    
	    __webpack_require__(53),
	    
	    __webpack_require__(54),
	    
	    __webpack_require__(55),
	    
	    __webpack_require__(56),
	    
	    __webpack_require__(57),
	    
	    __webpack_require__(59),
	    
	    __webpack_require__(60),
	    
	    __webpack_require__(61),
	    
	    __webpack_require__(62),
	    
	    __webpack_require__(63),
	    
	    __webpack_require__(28),
	    
	    __webpack_require__(64),
	    
	    __webpack_require__(65),
	    
	    __webpack_require__(66),
	    
	    __webpack_require__(69),
	    
	    __webpack_require__(70),
	    
	    __webpack_require__(72),
	    
	    __webpack_require__(73),
	    
	    __webpack_require__(74),
	    
	    __webpack_require__(68),
	    
	    __webpack_require__(75),
	    
	    __webpack_require__(76),
	    
	    __webpack_require__(67),
	    
	    __webpack_require__(77),
	    
	    __webpack_require__(78),
	    
	    __webpack_require__(79),
	    
	    __webpack_require__(80),
	    
	    __webpack_require__(71),
	    
	    __webpack_require__(81),
	    
	    __webpack_require__(82),
	    
	    __webpack_require__(83),
	    
	    __webpack_require__(84),
	    
	    __webpack_require__(85),
	    
	    __webpack_require__(86),
	    
	    __webpack_require__(58),
	    
	    __webpack_require__(87),
	    
	    __webpack_require__(88),
	    
	    __webpack_require__(89),
	    
	    __webpack_require__(90),
	    
	    __webpack_require__(91),
	    
	    __webpack_require__(92),
	    
	    __webpack_require__(93),
	    
	    __webpack_require__(94),
	    
	    __webpack_require__(95),
	    
	    __webpack_require__(96),
	    
	    __webpack_require__(97),
	    
	    __webpack_require__(98),
	    
	    __webpack_require__(99),
	    
	    __webpack_require__(47),
	    
	    __webpack_require__(50),
	    
	    __webpack_require__(33),
	    
	    __webpack_require__(29),
	    
	    __webpack_require__(30),
	    
	    __webpack_require__(31),
	    
	    __webpack_require__(100),
	    
	    __webpack_require__(101),
	    
	    __webpack_require__(112),
	    
	    __webpack_require__(6),
	    
	    __webpack_require__(7),
	    
	    __webpack_require__(4),
	    
	    __webpack_require__(102),
	    
	    __webpack_require__(103),
	    
	    __webpack_require__(108),
	    
	    __webpack_require__(109),
	    
	    __webpack_require__(113),
	    
	    __webpack_require__(111),
	    
	    __webpack_require__(114),
	    
	    __webpack_require__(2),
	    
	    __webpack_require__(115),
	    
	    __webpack_require__(116),
	    
	    __webpack_require__(117),
	    
	    __webpack_require__(118),
	    
	    __webpack_require__(119),
	    
	    __webpack_require__(120),
	    
	    __webpack_require__(121),
	    
	    __webpack_require__(122),
	    
	    __webpack_require__(125),
	    
	    __webpack_require__(123),
	    
	    __webpack_require__(124),
	    
	    __webpack_require__(126),
	    
	    __webpack_require__(127),
	    
	    __webpack_require__(128),
	    
	    __webpack_require__(129),
	    
	    __webpack_require__(130),
	    
	    __webpack_require__(131),
	    
	    __webpack_require__(132),
	    
	    __webpack_require__(133),
	    
	    __webpack_require__(134),
	    
	    __webpack_require__(135),
	    
	    __webpack_require__(136),
	    
	    __webpack_require__(138),
	    
	    __webpack_require__(137),
	    
	    __webpack_require__(139),
	    
	    __webpack_require__(140),
	    
	    __webpack_require__(141),
	    
	    __webpack_require__(142),
	    
	    __webpack_require__(143),
	    
	    __webpack_require__(144),
	    
	    __webpack_require__(152),
	    
	    __webpack_require__(153),
	    
	    __webpack_require__(154),
	    
	    __webpack_require__(167),
	    
	    __webpack_require__(159),
	    
	    __webpack_require__(158),
	    
	    __webpack_require__(157),
	    
	    __webpack_require__(166),
	    
	    __webpack_require__(156),
	    
	    __webpack_require__(155),
	    
	    __webpack_require__(168),
	    
	    __webpack_require__(193),
	    
	    __webpack_require__(194),
	    
	    __webpack_require__(150),
	    
	    __webpack_require__(195),
	    
	    __webpack_require__(151),
	    
	    __webpack_require__(163),
	    
	    __webpack_require__(162),
	    
	    __webpack_require__(186),
	    
	    __webpack_require__(196),
	    
	    __webpack_require__(197),
	    
	    __webpack_require__(198),
	    
	    __webpack_require__(199),
	    
	    __webpack_require__(149),
	    
	    __webpack_require__(164),
	    
	    __webpack_require__(148),
	    
	    __webpack_require__(147),
	    
	    __webpack_require__(146),
	    
	    __webpack_require__(145),
	    
	    __webpack_require__(183),
	    
	    __webpack_require__(161),
	    
	    __webpack_require__(200),
	    
	    __webpack_require__(160),
	    
	    __webpack_require__(182),
	    
	    __webpack_require__(201),
	    
	    __webpack_require__(202),
	    
	    __webpack_require__(203),
	    
	    __webpack_require__(204),
	    
	    __webpack_require__(205),
	    
	    __webpack_require__(206),
	    
	    __webpack_require__(207),
	    
	    __webpack_require__(191),
	    
	    __webpack_require__(208),
	    
	    __webpack_require__(176),
	    
	    __webpack_require__(184),
	    
	    __webpack_require__(185),
	    
	    __webpack_require__(189),
	    
	    __webpack_require__(181),
	    
	    __webpack_require__(178),
	    
	    __webpack_require__(180),
	    
	    __webpack_require__(179),
	    
	    __webpack_require__(209),
	    
	    __webpack_require__(210),
	    
	    __webpack_require__(211),
	    
	    __webpack_require__(212),
	    
	    __webpack_require__(213),
	    
	    __webpack_require__(173),
	    
	    __webpack_require__(172),
	    
	    __webpack_require__(171),
	    
	    __webpack_require__(170),
	    
	    __webpack_require__(169),
	    
	    __webpack_require__(214),
	    
	    __webpack_require__(188),
	    
	    __webpack_require__(187),
	    
	    __webpack_require__(216),
	    
	    __webpack_require__(175),
	    
	    __webpack_require__(174),
	    
	    __webpack_require__(217),
	    
	    __webpack_require__(218),
	    
	    __webpack_require__(215),
	    
	    __webpack_require__(177),
	    
	    __webpack_require__(192),
	    
	], __WEBPACK_AMD_DEFINE_RESULT__ = function() {
	  'use strict';

	  function createNamespace() {
	      var a = arguments,o = null,d,rt;
	      for(var i = 0,l1 = a.length; i < l1; i++){ //可一次创建多个命名空间(数组)。

	          d = a[i].split('.'); //将传入的参数用符号'.' 进行分割，并放入d数组中。

	          rt = d[0];
	          //判断数组中的第一个值是否未定义，如果未定义，便定义为空对象{},并赋值给变量o

	          eval('if (typeof ' + rt + ' == "undefined"){' + rt + ' = {};} o = ' + rt + ';');
	          for(var j = 1,l2 = d.length; j < l2; j++){
	              //循环遍历数组d每个值作为key，加入到对象o中，如果key在o中存在，则取o中值，若不存在，则赋值为空对象{} 　　

	              o[d[j]] = o[d[j]] || {};
	              o = o[d[j]];
	          }
	        }
	  }

	  var COM = {};
	  createNamespace('COM.util','COM.draw2d','COM.gef');

	  //taranstalte to namespace;

	  
	    COM.util=arguments[0];
	  
	    COM.draw2d.Canvas=arguments[1];
	  
	    COM.draw2d.Html5Event=arguments[2];
	  
	    COM.draw2d.Map=arguments[3];
	  
	    COM.draw2d.Rectangle=arguments[4];
	  
	    COM.draw2d.Dimension=arguments[5];
	  
	    COM.draw2d.Point=arguments[6];
	  
	    COM.draw2d.AbsoluteBendpoint=arguments[7];
	  
	    COM.draw2d.Insets=arguments[8];
	  
	    COM.draw2d.Geometry=arguments[9];
	  
	    COM.draw2d.PointList=arguments[10];
	  
	    COM.draw2d.Transform=arguments[11];
	  
	    COM.draw2d.Transposer=arguments[12];
	  
	    COM.draw2d.PositionConstants=arguments[13];
	  
	    COM.draw2d.FigureUtilities=arguments[14];
	  
	    COM.draw2d.Color=arguments[15];
	  
	    COM.draw2d.ColorConstants=arguments[16];
	  
	    COM.draw2d.AbstractBorder=arguments[17];
	  
	    COM.draw2d.AbstractBackground=arguments[18];
	  
	    COM.draw2d.AbstractLabeledBorder=arguments[19];
	  
	    COM.draw2d.CompoundBorder=arguments[20];
	  
	    COM.draw2d.FocusBorder=arguments[21];
	  
	    COM.draw2d.LineBorder=arguments[22];
	  
	    COM.draw2d.MarginBorder=arguments[23];
	  
	    COM.draw2d.Scheme=arguments[24];
	  
	    COM.draw2d.SchemeBorder=arguments[25];
	  
	    COM.draw2d.ButtonScheme=arguments[26];
	  
	    COM.draw2d.ButtonBorder=arguments[27];
	  
	    COM.draw2d.Graphics=arguments[28];
	  
	    COM.draw2d.TreeSearch=arguments[29];
	  
	    COM.draw2d.ExclusionSearch=arguments[30];
	  
	    COM.draw2d.Figure=arguments[31];
	  
	    COM.draw2d.Label=arguments[32];
	  
	    COM.draw2d.Panel=arguments[33];
	  
	    COM.draw2d.Shape=arguments[34];
	  
	    COM.draw2d.Ellipse=arguments[35];
	  
	    COM.draw2d.AbstractPointListShape=arguments[36];
	  
	    COM.draw2d.RectangleFigure=arguments[37];
	  
	    COM.draw2d.RoundedRectangle=arguments[38];
	  
	    COM.draw2d.Triangle=arguments[39];
	  
	    COM.draw2d.PolygonShape=arguments[40];
	  
	    COM.draw2d.Polyline=arguments[41];
	  
	    COM.draw2d.Polygon=arguments[42];
	  
	    COM.draw2d.PolylineShape=arguments[43];
	  
	    COM.draw2d.ScalablePolygonShape=arguments[44];
	  
	    COM.draw2d.PolylineDecoration=arguments[45];
	  
	    COM.draw2d.PolygonDecoration=arguments[46];
	  
	    COM.draw2d.FigureConstants=arguments[47];
	  
	    COM.draw2d.RootFigure=arguments[48];
	  
	    COM.draw2d.Layer=arguments[49];
	  
	    COM.draw2d.LayeredPane=arguments[50];
	  
	    COM.draw2d.ScalableLayeredPane=arguments[51];
	  
	    COM.draw2d.FreeformLayeredPane=arguments[52];
	  
	    COM.draw2d.ScalableFreeformLayeredPane=arguments[53];
	  
	    COM.draw2d.FreeformLayer=arguments[54];
	  
	    COM.draw2d.ConnectionLayer=arguments[55];
	  
	    COM.draw2d.AbstractLayout=arguments[56];
	  
	    COM.draw2d.XYLayout=arguments[57];
	  
	    COM.draw2d.FreeformLayout=arguments[58];
	  
	    COM.draw2d.StackLayout=arguments[59];
	  
	    COM.draw2d.DelegatingLayout=arguments[60];
	  
	    COM.draw2d.AbstractHintLayout=arguments[61];
	  
	    COM.draw2d.ViewportLayout=arguments[62];
	  
	    COM.draw2d.FreeformViewportLayout=arguments[63];
	  
	    COM.draw2d.FreeformHelper=arguments[64];
	  
	    COM.draw2d.AbstractLocator=arguments[65];
	  
	    COM.draw2d.ConnectionLocator=arguments[66];
	  
	    COM.draw2d.ArrowLocator=arguments[67];
	  
	    COM.draw2d.MidpointLocator=arguments[68];
	  
	    COM.draw2d.BendpointLocator=arguments[69];
	  
	    COM.draw2d.RelativeLocator=arguments[70];
	  
	    COM.draw2d.Connection=arguments[71];
	  
	    COM.draw2d.ConnectionAnchorBase=arguments[72];
	  
	    COM.draw2d.XYAnchor=arguments[73];
	  
	    COM.draw2d.AbstractConnectionAnchor=arguments[74];
	  
	    COM.draw2d.BottomAnchor=arguments[75];
	  
	    COM.draw2d.TopAnchor=arguments[76];
	  
	    COM.draw2d.EllipseAnchor=arguments[77];
	  
	    COM.draw2d.ChopboxAnchor=arguments[78];
	  
	    COM.draw2d.LabelAnchor=arguments[79];
	  
	    COM.draw2d.RoutingNotifier=arguments[80];
	  
	    COM.draw2d.AbstractRouter=arguments[81];
	  
	    COM.draw2d.NullConnectionRouter=arguments[82];
	  
	    COM.draw2d.BendpointConnectionRouter=arguments[83];
	  
	    COM.draw2d.PolylineConnection=arguments[84];
	  
	    COM.draw2d.TextUtilities=arguments[85];
	  
	    COM.draw2d.LineAttributes=arguments[86];
	  
	    COM.draw2d.UpdateManager=arguments[87];
	  
	    COM.draw2d.EventListenerList=arguments[88];
	  
	    COM.draw2d.TypeIterator=arguments[89];
	  
	    COM.draw2d.AncestorHelper=arguments[90];
	  
	    COM.draw2d.GraphicsSource=arguments[91];
	  
	    COM.draw2d.LightweightSystem=arguments[92];
	  
	    COM.draw2d.EventHandler=arguments[93];
	  
	    COM.draw2d.PropertyChangeEvent=arguments[94];
	  
	    COM.draw2d.PropertyChangeListenerProxy=arguments[95];
	  
	    COM.draw2d.PropertyChangeSupport=arguments[96];
	  
	    COM.draw2d.EventDispatcher=arguments[97];
	  
	    COM.draw2d.FocusTraverseManager=arguments[98];
	  
	    COM.draw2d.ToolTipHelper=arguments[99];
	  
	    COM.draw2d.ToolTipBorder=arguments[100];
	  
	    COM.draw2d.Event=arguments[101];
	  
	    COM.draw2d.Cursor=arguments[102];
	  
	    COM.draw2d.ImageResourceManager=arguments[103];
	  
	    COM.draw2d.DefaultRangeModel=arguments[104];
	  
	    COM.draw2d.Viewport=arguments[105];
	  
	    COM.draw2d.FreeformViewport=arguments[106];
	  
	    COM.draw2d.Clickable=arguments[107];
	  
	    COM.draw2d.Button=arguments[108];
	  
	    COM.draw2d.ButtonModel=arguments[109];
	  
	    COM.draw2d.ScrollPane=arguments[110];
	  
	    COM.draw2d.ScrollPaneLayout=arguments[111];
	  
	    COM.draw2d.ScrollPaneSolver=arguments[112];
	  
	    COM.draw2d.ScrollBarLayout=arguments[113];
	  
	    COM.draw2d.ScrollBar=arguments[114];
	  
	    COM.draw2d.ThumbDragger=arguments[115];
	  
	    COM.gef.Mouse=arguments[116];
	  
	    COM.gef.KeyStroke=arguments[117];
	  
	    COM.gef.ConditionalTreeSearch=arguments[118];
	  
	    COM.gef.EditPart=arguments[119];
	  
	    COM.gef.LayerConstants=arguments[120];
	  
	    COM.gef.LayerManager=arguments[121];
	  
	    COM.gef.EditPolicy=arguments[122];
	  
	    COM.gef.EditPartFactory=arguments[123];
	  
	    COM.gef.EditPartViewer=arguments[124];
	  
	    COM.gef.Command=arguments[125];
	  
	    COM.gef.CommandStack=arguments[126];
	  
	    COM.gef.EventObject=arguments[127];
	  
	    COM.gef.CommandStackEvent=arguments[128];
	  
	    COM.gef.DomainEventDispatcher=arguments[129];
	  
	    COM.gef.RequestConstants=arguments[130];
	  
	    COM.gef.Request=arguments[131];
	  
	    COM.gef.SelectionManager=arguments[132];
	  
	    COM.gef.Tool=arguments[133];
	  
	    COM.gef.EditDomain=arguments[134];
	  
	    COM.gef.EditPartListener=arguments[135];
	  
	    COM.gef.AbstractEditPartViewer=arguments[136];
	  
	    COM.gef.GraphicalViewerImpl=arguments[137];
	  
	    COM.gef.FeedbackLayer=arguments[138];
	  
	    COM.gef.AbstractEditPart=arguments[139];
	  
	    COM.gef.AbstractGraphicalEditPart=arguments[140];
	  
	    COM.gef.SimpleRootEditPart=arguments[141];
	  
	    COM.gef.ScalableRootEditPart=arguments[142];
	  
	    COM.gef.FreeformGraphicalRootEditPart=arguments[143];
	  
	    COM.gef.ScalableFreeformRootEditPart=arguments[144];
	  
	    COM.gef.UnlimitedFreeformEditPart=arguments[145];
	  
	    COM.gef.AbstractNodeEditPart=arguments[146];
	  
	    COM.gef.AbstractConnectionEditPart=arguments[147];
	  
	    COM.gef.LocationRequest=arguments[148];
	  
	    COM.gef.BendpointRequest=arguments[149];
	  
	    COM.gef.SelectionRequest=arguments[150];
	  
	    COM.gef.GroupRequest=arguments[151];
	  
	    COM.gef.ChangeBoundsRequest=arguments[152];
	  
	    COM.gef.AlignmentRequest=arguments[153];
	  
	    COM.gef.CreateRequest=arguments[154];
	  
	    COM.gef.CreateConnectionRequest=arguments[155];
	  
	    COM.gef.ReconnectRequest=arguments[156];
	  
	    COM.gef.MarqueeSelectionRequest=arguments[157];
	  
	    COM.gef.FlagSupport=arguments[158];
	  
	    COM.gef.ToolUtilities=arguments[159];
	  
	    COM.gef.Input4Tool=arguments[160];
	  
	    COM.gef.AbstractTool=arguments[161];
	  
	    COM.gef.TargetingTool=arguments[162];
	  
	    COM.gef.SelectionTool=arguments[163];
	  
	    COM.gef.SimpleDragTracker=arguments[164];
	  
	    COM.gef.SelectEditPartTracker=arguments[165];
	  
	    COM.gef.ConnectionBendpointTracker=arguments[166];
	  
	    COM.gef.DragEditPartsTracker=arguments[167];
	  
	    COM.gef.ResizeTracker=arguments[168];
	  
	    COM.gef.MarqueeSelectionTool=arguments[169];
	  
	    COM.gef.EditPartUtilities=arguments[170];
	  
	    COM.gef.DeselectAllTracker=arguments[171];
	  
	    COM.gef.CreationTool=arguments[172];
	  
	    COM.gef.AbstractConnectionCreationTool=arguments[173];
	  
	    COM.gef.ConnectionCreationTool=arguments[174];
	  
	    COM.gef.ConnectionEndpointTracker=arguments[175];
	  
	    COM.gef.CancelSelectionTracker=arguments[176];
	  
	    COM.gef.BrowseTool=arguments[177];
	  
	    COM.gef.AbstractHandle=arguments[178];
	  
	    COM.gef.MoveHandle=arguments[179];
	  
	    COM.gef.MoveHandleLocator=arguments[180];
	  
	    COM.gef.NonResizableHandleKit=arguments[181];
	  
	    COM.gef.RelativeHandleLocator=arguments[182];
	  
	    COM.gef.ResizableHandleKit=arguments[183];
	  
	    COM.gef.SquareHandle=arguments[184];
	  
	    COM.gef.ResizeHandle=arguments[185];
	  
	    COM.gef.ConnectionHandle=arguments[186];
	  
	    COM.gef.ConnectionEndpointHandle=arguments[187];
	  
	    COM.gef.BendpointHandle=arguments[188];
	  
	    COM.gef.BendpointCreationHandle=arguments[189];
	  
	    COM.gef.BendpointMoveHandle=arguments[190];
	  
	    COM.gef.AbstractEditPolicy=arguments[191];
	  
	    COM.gef.GraphicalEditPolicy=arguments[192];
	  
	    COM.gef.LayoutEditPolicy=arguments[193];
	  
	    COM.gef.ConstrainedLayoutEditPolicy=arguments[194];
	  
	    COM.gef.XYLayoutEditPolicy=arguments[195];
	  
	    COM.gef.GraphicalNodeEditPolicy=arguments[196];
	  
	    COM.gef.SelectionEditPolicy=arguments[197];
	  
	    COM.gef.SelectionHandlesEditPolicy=arguments[198];
	  
	    COM.gef.ContainerEditPolicy=arguments[199];
	  
	    COM.gef.NonResizableEditPolicy=arguments[200];
	  
	    COM.gef.ResizableEditPolicy=arguments[201];
	  
	    COM.gef.BendpointEditPolicy=arguments[202];
	  
	    COM.gef.ConnectionEndpointEditPolicy=arguments[203];
	  
	    COM.gef.FeedbackHelper=arguments[204];
	  
	    COM.gef.RectangleFeedback=arguments[205];
	  
	    COM.gef.UnlimitedFreeformFigure=arguments[206];
	  

	  COM.gef.CompoundCommand = COM.gef.Command.CompoundCommand;

	  if(!window.COM){
	    window.COM = COM;
	  }

	  return COM;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));


/***/ },
/* 2 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(4)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, PropertyChangeSupport) {
	    'use strict';

	    var DefaultRangeModel = function() {
	        DefaultRangeModel.superclass.constructor.call(this);
	        this.minimum = 0;
	        this.maximum = 100;
	        this.extent = 20;
	        this.value = 0;
	        this.propertyListeners = new PropertyChangeSupport(this);

	    };

	    //static properties
	    DefaultRangeModel.PROPERTY_VALUE = "value";
	    DefaultRangeModel.PROPERTY_EXTENT = "extent";
	    DefaultRangeModel.PROPERTY_MINIMUM = "minimum";
	    DefaultRangeModel.PROPERTY_MAXIMUM = "maximum";

	    util.defineClass(DefaultRangeModel, Object, {
	        addPropertyChangeListener: function(listener) {
	            this.propertyListeners.addPropertyChangeListener(listener);
	        },
	        firePropertyChange: function(string, oldValue, newValue) {
	            this.propertyListeners.firePropertyChange(string, oldValue, newValue);
	        },
	        getExtent: function() {
	            return this.extent;
	        },
	        getMaximum: function() {
	            return this.maximum;
	        },
	        getMinimum: function() {
	            return this.minimum;
	        },
	        getValue: function() {
	            return this.value;
	        },
	        isEnabled: function() {
	            return (this.getMaximum() - this.getMinimum()) > this.getExtent();
	        },
	        removePropertyChangeListener: function(listener) {
	            this.propertyListeners.removePropertyChangeListener(listener);
	        },
	        setAll: function(min, ext, max) {
	            var oldMin = this.minimum;
	            var oldExtent = this.extent;
	            var oldMax = this.maximum;

	            this.maximum = max;
	            this.minimum = min;
	            this.extent = ext;

	            if (oldMax != max) {
	                this.firePropertyChange(DefaultRangeModel.PROPERTY_MAXIMUM, oldMax, max);
	            }
	            if (oldExtent != ext) {
	                this.firePropertyChange(DefaultRangeModel.PROPERTY_EXTENT, oldExtent, ext);
	            }
	            if (oldMin != min) {
	                this.firePropertyChange(DefaultRangeModel.PROPERTY_MINIMUM, oldMin, min);
	            }
	            this.setValue(this.getValue());
	        },
	        setExtent: function(extent) {
	            if (this.extent == extent) {
	                return;
	            }
	            var oldValue = this.extent;
	            this.extent = extent;
	            this.firePropertyChange(DefaultRangeModel.PROPERTY_EXTENT, oldValue, extent);
	            this.setValue(this.getValue());
	        },
	        setMaximum: function(maximum) {
	            if (this.maximum == maximum) {
	                return;
	            }
	            var oldValue = this.maximum;
	            this.maximum = maximum;
	            this.firePropertyChange(DefaultRangeModel.PROPERTY_MAXIMUM, oldValue, maximum);
	            this.setValue(this.getValue());
	        },
	        setMinimum: function(minimum) {
	            if (this.minimum == minimum) {
	                return;
	            }
	            var oldValue = this.minimum;
	            this.minimum = minimum;
	            this.firePropertyChange(DefaultRangeModel.PROPERTY_MINIMUM, oldValue, minimum);
	            this.setValue(this.getValue());
	        },
	        setValue: function(value) {
	            value = Math.max(this.getMinimum(), Math.min(this.getMaximum() - this.getExtent(), value));
	            if (this.value == value) {
	                return;
	            }
	            var oldValue = this.value;
	            this.value = value;
	            this.firePropertyChange(DefaultRangeModel.PROPERTY_VALUE, oldValue, value);
	        }
	    });

	    return DefaultRangeModel;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @module draw2d/util
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require) {
	    'use strict';

	    var util = {};

	    //browser
	    (function(domain) {
	        if (domain.browser) {
	            return;
	        }
	        var ua = navigator.userAgent;
	        domain.browser = {
	            version: (ua.match(/.+(?:rv|it|ra|ie|me)[\/: ]([\d.]+)/i) || [])[1],
	            ie: /msie/i.test(ua) && !/opera/i.test(ua),
	            op: /opera/i.test(ua),
	            sa: /version.*safari/i.test(ua),
	            ch: /chrome/.test(ua),
	            ff: /gecko/i.test(ua) && !/webkit/i.test(ua),
	            wk: /webkit/i.test(ua),
	            mz: /mozilla/i.test(ua) && !/(compatible|webkit)/i.test(ua)
	        };

	        function isMobile() {
	            return navigator.userAgent.match(/iP(ad|hone)/i) || navigator.userAgent.match(/ndroid/i);
	        }
	        domain.browser.isMobile = isMobile();
	        //针对IE11的校正
	        //IE11为：
	        //ie：false
	        //ff:true
	        //mz:true
	        //ch:false

	        function isIE() { //ie?
	            if (!!window.ActiveXObject || "ActiveXObject" in window)
	                return true;
	            else
	                return false;
	        }
	        if (!domain.browser.ie) {
	            domain.browser.ie = isIE();
	        }

	    })(util);

	    (function(domain) {

	        function backingScale() {
	            if ('devicePixelRatio' in window) {
	                if (window.devicePixelRatio > 1) {
	                    return window.devicePixelRatio;
	                }
	            }
	        }
	        if (!domain.Screen) {
	            domain.Screen = {};
	        }
	        domain.Screen.scaleFactor = backingScale() || 1;

	    })(util);

	    (function(domain) {
	        if (domain.Array) {
	            return;
	        }

	        function isArray(array) {
	            return typeof array == 'object' && typeof array.length === 'number' && !(array.propertyIsEnumerable('length'));
	        }

	        function contains(array, value) {
	            if (!isArray(array)) {
	                return false;
	            }
	            var i;
	            for (i = 0; i < array.length; i++) {
	                if (array[i] === value) {
	                    return true;
	                }
	            }

	            return false;
	        }

	        function indexOf(array, value) {
	            if (!isArray(array)) {
	                return -1;
	            }
	            var i;
	            for (i = 0; i < array.length; i++) {
	                if (array[i] === value) {
	                    return i;
	                }
	            }
	            return -1;
	        }

	        function removeItem(array, item) {
	            var temp;
	            for (var i = 0, max = array.length; i < max; i++) {
	                if (array[i] == item) {
	                    temp = array[i];
	                    array.splice(i, 1);
	                    return temp;
	                }
	            }
	        }

	        function remove(array, value) {
	            var index = indexOf(array, value);
	            if (index > -1) {
	                array.splice(index, 1);
	            }
	        }

	        function copy(array) {
	            if (!isArray(array)) {
	                return [];
	            }
	            var result = [];
	            for (var i = 0; i < array.length; i++) {
	                result.push(array[i]);
	            }
	            return result;
	        }

	        function add(array, item, index) {
	            if (index != null && item != null) {
	                array.splice(index, 0, item);
	            } else if (item != null && index == null) {
	                array.push(item);
	            }
	        }

	        function each(array, fn, obj) {
	            for (var i = 0, len = array.length; i < len; i++) {
	                fn.call(obj, array[i], i, this);
	            }
	        }

	        function addAll(array, otherArray){
	          for(var i=0,len = otherArray.length; i<len; i++){
	            array.push(otherArray[i]);
	          }
	        }



	        var array = {};

	        array.isArray = isArray;
	        array.contains = contains;
	        array.indexOf = indexOf;
	        array.remove = remove;
	        array.copy = copy;
	        array.add = add;
	        array.each = each;
	        array.removeItem = removeItem;
	        array.addAll = addAll;

	        domain.Array = array;

	    })(util);


	    // var Debugger=function(){
	    // 	function empty(){};
	    // 	var de = {
	    // 		error: empty,
	    // 		log: empty
	    // 	};
	    // 	function unlock() {
	    // 		if (console && console.error) {
	    // 			de.error = function(msg) {
	    // 				console.error(msg);
	    // 			}
	    // 		}
	    // 		if (console && console.log) {
	    // 			de.log = function(msg) {
	    // 				console.log(msg);
	    // 			}
	    // 		}
	    // 	}
	    // 	function lock() {
	    // 		de.error = empty;
	    // 		de.log = empty;
	    // 	}
	    // 	// if (util.browser.ie) {
	    // 	//
	    // 	// } else {
	    // 	// 	unlock();
	    // 	// }
	    // 	de.lock = lock;
	    // 	de.unlock = unlock;
	    // 	return de;
	    // }();

	    (function(domain) {
	        domain.supportEventEmitter = function(obj) {
	            var listeners = {};
	            obj.on = function(key, l) {
	                var ls = listeners[key];
	                if (!ls) {
	                    ls = [];
	                    listeners[key] = ls;
	                }
	                ls.push(l);
	            };
	            obj.off = function(key, l) {
	                var ls = listeners[key];
	                if (ls) {
	                    util.Array.removeItem(ls, l);
	                }
	            };
	            obj.emit = function(key) {
	                var ls = listeners[key];
	                if (ls && ls.forEach) {
	                    var args = [];
	                    for (var i = 1; i < arguments.length; i++) {
	                        args.push(arguments[i]);
	                    }
	                    ls.forEach(function(l) {
	                        l.apply(null, args);
	                    });
	                }
	            };
	        };
	    })(util);

	    (function(domain) {
	        function _override(o, overrides, exceptions) {
	            for (var p in overrides) {
	                if (exceptions && exceptions[p]) continue;
	                o[p] = overrides[p];
	            }
	        }

	        if (!domain.extend) {
	            domain.defineClass = function(util, superclass, override) {
	                if (typeof superclass !== 'function' && typeof superclass === 'object' && typeof override === 'undefined') {
	                    override = superclass;
	                    superclass = Object;
	                }
	                //check
	                if (null == superclass) {
	                    throw 'no superclass, you can use Object or do not give the superclass arg.';
	                }
	                //perform
	                var f = new Function();
	                f.prototype = superclass.prototype;
	                var p = util.prototype = new f();
	                p.constructor = util;
	                util.superclass = superclass.prototype;
	                if (override) _override(util.prototype, override);
	            };
	        }

	    })(util);

	    (function() {
	        util.isInstanceOf = function(obj, clazz) {
	            if (obj.isInstanceOf) {
	                return obj.isInstanceOf(clazz);
	            } else {
	                return obj instanceof clazz;
	            }
	        };
	    })();

	    //此部分代码是从gef2里面的util模块合并过来的
	    //Array

	    //EventRegister
	    (function(domain) {
	        if (domain.EventRegister) {
	            return;
	        }

	        function addEvent(el, type, fn) {
	            (el.attachEvent) ? (el.attachEvent("on" + type, fn)) : (el.addEventListener(type, fn, false));
	        }
	        domain.EventRegister = {
	            "addEvent": addEvent

	        };

	    })(util);

	    //COMMON
	    (function(domain) {
	        if (domain.Common) {
	            return;
	        }

	        function to26Str(num) {
	            if (num) {
	                num--;
	                var result = [];
	                while (num >= 0) {
	                    result.unshift(String.fromCharCode((num % 26 + 65)));
	                    num = Math.floor(num / 26) - 1;
	                }
	                return result.join("");
	            } else {
	                return "";
	            }

	            /*
			var t = new String(num.toString(26));
	        var c;
	        var result = "";
	        var a = "A";
	        var code = a.charCodeAt(0);
	        for (var i = 0; i < t.length; i++) {
	           c = t[i];
	            var n = parseInt(c, 26);
	            var charcode = n + code;
	            if (i == 0) {
	            	charcode--;
	            }
	            result += String.fromCharCode(charcode);
	        }
	        return result;
	        */
	        }
	        domain.Common = {
	            "to26Str": to26Str

	        };

	    })(util);

	    //browser
	    (function(domain) {
	        if (domain.browser) {
	            return;
	        }
	        domain.browser = util.browser;
	    })(util);

	    (function(domain) {
	        /**
	         * 绘制背景样式的帮助工具
	         */

	        if (domain.BackStyleHelper) {
	            return;
	        }

	        var BackStyleHelper = {
	            /**
	             * @arguments {画笔(Html5Graphics), 横坐标(Number)，纵坐标(Number)，宽度(Number)，高度(Number)， 样式类型(Number), 背景颜色(字符串)}
	             */
	            drawBackStyle: function(graphics, x, y, width, height, style, backColor) {
	                    var pattern = this.oppositePatterns[style];
	                    backColor = backColor || '#000';
	                    //填充颜色
	                    graphics.setFillStyle(backColor);
	                    graphics.fillRect(x, y, width, height);
	                    //填充样式
	                    if (pattern) {
	                        graphics.setFillStyle(pattern);
	                        graphics.fillRect(x, y, width, height);
	                    }
	                }
	                /*,
	                		drawBackStyle3: function (context, x, y , width, height, style ,backColor) {
	                			var pattern = this.oppositePatterns[style];
	                			backColor = backColor || '#000';
	                			//填充颜色
	                			context.fillStyle = backColor;
	                			context.fillRect(x, y , width, height);
	                			//填充样式
	                			if (pattern) {
	                				context.fillStyle = pattern;
	                				context.fillRect(x, y , width, height);
	                			}
	                		},
	                		drawBackStyle2: function (graphics, x, y , width, height, style ,backColor) {
	                			var pattern = this.patterns[style];
	                			backColor = backColor || '#000';
	                			//填充样式
	                			if (pattern) {
	                				graphics.setFillStyle(pattern);
	                				graphics.fillRect(x, y , width, height);
	                			}
	                		}
	                		*/
	        };
	        BackStyleHelper.patternCreater = (function() {
	            var canvas = document.createElement('canvas');
	            if (!canvas || !canvas.getContext) {
	                this.createOpposite = function() {};
	                this.create = function() {};
	                return this;
	            }
	            var context = canvas.getContext('2d');
	            /**
	             * 利用绘制好的背景样式创建填充模式
	             */
	            function createStylePattern(data) {
	                var height = data.length;
	                var width = data[0].length;
	                canvas.width = width;
	                canvas.height = height;
	                paintStyleOpposite(context, 0, 0, width, height, data, 0, 0.5);
	                var pattern = context.createPattern(canvas, "repeat");
	                return pattern;
	            }
	            /**
	             * 绘制背景样式
	             */
	            function paintStyle(context, x, y, width, height, data, backColor, offsetX, offsetY) {
	                var beginX = (x << 0) + offsetX;
	                var beginY = (y << 0) + offsetY;
	                var paintX = beginX;
	                var paintY = beginY;
	                for (var i = 0; i < height; i++) {
	                    paintX = beginX;
	                    for (var j = 0; j < width; j++) {
	                        context.strokeStyle = data[i % 8][j % 8] ? backColor : "#fff";
	                        context.beginPath();
	                        context.moveTo(paintX, paintY);
	                        context.lineTo(paintX + 1, paintY);
	                        context.stroke();
	                        paintX++;
	                    }
	                    paintY++;
	                }
	            }
	            /**
	             * 绘制反向背景样式
	             */
	            function paintStyleOpposite(context, x, y, width, height, data, offsetX, offsetY) {
	                var beginX = (x << 0) + offsetX;
	                var beginY = (y << 0) + offsetY;
	                var paintX = beginX;
	                var paintY = beginY;
	                for (var i = 0; i < height; i++) {
	                    paintX = beginX;
	                    for (var j = 0; j < width; j++) {
	                        if (data[i % 8][j % 8] == 0) {
	                            context.strokeStyle = "#fff";
	                            context.beginPath();
	                            context.moveTo(paintX, paintY);
	                            context.lineTo(paintX + 1, paintY);
	                            context.stroke();
	                        }
	                        paintX++;
	                    }
	                    paintY++;
	                }
	            }
	            /**
	             *
	             */
	            this.createOpposite = createStylePattern;
	            /**
	             *
	             */
	            this.create = createStylePattern;
	            return this;
	        }).call({});

	        //为BackStyleHelper的patterns赋值
	        (function(helper) {
	            var styleDatas = [
	                [ //cbsDiagCrossLine

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [0, 1, 0, 1, 0, 1, 0, 1],

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [0, 1, 0, 1, 0, 1, 0, 1],

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [0, 1, 0, 1, 0, 1, 0, 1],

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [0, 1, 0, 1, 0, 1, 0, 1]
	                ],

	                [ //cbsDiagCrossBlock

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [0, 1, 0, 0, 0, 1, 0, 0],

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [0, 1, 0, 0, 0, 1, 0, 0],

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0]
	                ],

	                [ //cbsCruxBlock

	                    [0, 0, 1, 0, 0, 0, 1, 0],

	                    [0, 0, 1, 0, 0, 0, 0, 0],

	                    [1, 1, 0, 1, 1, 0, 0, 0],

	                    [0, 0, 1, 0, 0, 0, 0, 0],

	                    [0, 0, 1, 0, 0, 0, 1, 0],

	                    [0, 0, 0, 0, 0, 0, 1, 0],

	                    [1, 0, 0, 0, 1, 1, 0, 1],

	                    [0, 0, 0, 0, 0, 0, 1, 0]
	                ],

	                [ //cbsCrossDot

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0]
	                ],

	                [ //cbsDiagCrossDot

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 1, 0, 0, 0, 1, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 0, 0, 1, 0, 0, 0, 1],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 1, 0, 0, 0, 1, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 0, 0, 1, 0, 0, 0, 1]
	                ],

	                [ //cbsHorzLine

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [1, 1, 1, 1, 1, 1, 1, 1],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [1, 1, 1, 1, 1, 1, 1, 1],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [1, 1, 1, 1, 1, 1, 1, 1],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [1, 1, 1, 1, 1, 1, 1, 1]
	                ],

	                [ //cbsVertLine

	                    [0, 1, 0, 1, 0, 1, 0, 1],

	                    [0, 1, 0, 1, 0, 1, 0, 1],

	                    [0, 1, 0, 1, 0, 1, 0, 1],

	                    [0, 1, 0, 1, 0, 1, 0, 1],

	                    [0, 1, 0, 1, 0, 1, 0, 1],

	                    [0, 1, 0, 1, 0, 1, 0, 1],

	                    [0, 1, 0, 1, 0, 1, 0, 1],

	                    [0, 1, 0, 1, 0, 1, 0, 1]
	                ],

	                [ //cbsBDiagLine

	                    [0, 0, 0, 1, 0, 0, 0, 1],

	                    [0, 0, 1, 0, 0, 0, 1, 0],

	                    [0, 1, 0, 0, 0, 1, 0, 0],

	                    [1, 0, 0, 0, 1, 0, 0, 0],

	                    [0, 0, 0, 1, 0, 0, 0, 1],

	                    [0, 0, 1, 0, 0, 0, 1, 0],

	                    [0, 1, 0, 0, 0, 1, 0, 0],

	                    [1, 0, 0, 0, 1, 0, 0, 0]
	                ],

	                [ //cbsFDiagLine

	                    [1, 0, 0, 0, 1, 0, 0, 0],

	                    [0, 1, 0, 0, 0, 1, 0, 0],

	                    [0, 0, 1, 0, 0, 0, 1, 0],

	                    [0, 0, 0, 1, 0, 0, 0, 1],

	                    [1, 0, 0, 0, 1, 0, 0, 0],

	                    [0, 1, 0, 0, 0, 1, 0, 0],

	                    [0, 0, 1, 0, 0, 0, 1, 0],

	                    [0, 0, 0, 1, 0, 0, 0, 1]
	                ],

	                [ //cbsHorzLineSparse

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [1, 1, 1, 1, 1, 1, 1, 1],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [1, 1, 1, 1, 1, 1, 1, 1],

	                    [0, 0, 0, 0, 0, 0, 0, 0]
	                ],

	                [ //cbsVertLineSparse

	                    [0, 0, 1, 0, 0, 0, 1, 0],

	                    [0, 0, 1, 0, 0, 0, 1, 0],

	                    [0, 0, 1, 0, 0, 0, 1, 0],

	                    [0, 0, 1, 0, 0, 0, 1, 0],

	                    [0, 0, 1, 0, 0, 0, 1, 0],

	                    [0, 0, 1, 0, 0, 0, 1, 0],

	                    [0, 0, 1, 0, 0, 0, 1, 0],

	                    [0, 0, 1, 0, 0, 0, 1, 0]
	                ],

	                [ //cbsHorzDashDot

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [1, 1, 1, 1, 0, 0, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0]
	                ],

	                [ //cbsVertDashDot

	                    [0, 0, 1, 0, 0, 0, 1, 0],

	                    [0, 0, 0, 0, 0, 0, 1, 0],

	                    [0, 0, 1, 0, 0, 0, 1, 0],

	                    [0, 0, 0, 0, 0, 0, 1, 0],

	                    [0, 0, 1, 0, 0, 0, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 0, 1, 0, 0, 0, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0]
	                ],

	                [ //cbsWall

	                    [0, 0, 1, 0, 0, 0, 0, 0],

	                    [0, 0, 1, 0, 0, 0, 0, 0],

	                    [0, 0, 1, 0, 0, 0, 0, 0],

	                    [1, 1, 1, 1, 1, 1, 1, 1],

	                    [0, 0, 0, 0, 0, 0, 1, 0],

	                    [0, 0, 0, 0, 0, 0, 1, 0],

	                    [0, 0, 0, 0, 0, 0, 1, 0],

	                    [1, 1, 1, 1, 1, 1, 1, 1]
	                ],

	                [ //cbsTrees

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 1, 0, 0, 1, 0, 0, 1],

	                    [0, 0, 1, 0, 1, 0, 1, 0],

	                    [0, 0, 0, 1, 1, 1, 0, 0],

	                    [0, 0, 0, 1, 0, 1, 0, 0],

	                    [0, 0, 0, 1, 0, 1, 0, 0],

	                    [0, 1, 1, 1, 1, 1, 1, 1],

	                    [0, 0, 0, 0, 0, 0, 0, 0]
	                ],

	                [ //cbsGrass

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 0, 0, 1, 0, 1, 0, 0],

	                    [0, 0, 1, 0, 1, 0, 1, 0],

	                    [0, 0, 1, 0, 1, 0, 1, 0],

	                    [0, 0, 0, 0, 1, 0, 0, 0],

	                    [0, 0, 0, 0, 1, 0, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0]
	                ],

	                [ //cbsFlowers

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 0, 1, 0, 1, 0, 0, 0],

	                    [0, 1, 0, 0, 0, 1, 0, 0],

	                    [0, 0, 0, 1, 0, 0, 0, 0],

	                    [0, 1, 0, 0, 0, 1, 0, 0],

	                    [0, 0, 1, 0, 1, 0, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0]
	                ],

	                [ //cbsRounds

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 0, 1, 1, 1, 0, 0, 0],

	                    [0, 1, 0, 0, 0, 1, 0, 0],

	                    [0, 1, 0, 0, 0, 1, 0, 0],

	                    [0, 1, 0, 0, 0, 1, 0, 0],

	                    [0, 0, 1, 1, 1, 0, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0]
	                ],

	                [ //cbsLozenges

	                    [0, 0, 0, 1, 0, 0, 0, 0],

	                    [0, 0, 1, 0, 1, 0, 0, 0],

	                    [0, 1, 0, 0, 0, 1, 0, 0],

	                    [1, 0, 0, 0, 0, 0, 1, 0],

	                    [0, 1, 0, 0, 0, 1, 0, 0],

	                    [0, 0, 1, 0, 1, 0, 0, 0],

	                    [0, 0, 0, 1, 0, 0, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0]
	                ],

	                [ //cbsDiagCrux

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 1, 0, 0, 0, 0, 1, 0],

	                    [0, 0, 1, 0, 0, 1, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 0, 1, 0, 0, 1, 0, 0],

	                    [0, 1, 0, 0, 0, 0, 1, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0]
	                ],

	                [ //cbsHills

	                    [1, 0, 0, 0, 0, 0, 0, 1],

	                    [0, 1, 0, 0, 0, 0, 1, 0],

	                    [0, 0, 1, 0, 0, 1, 0, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0],

	                    [0, 0, 0, 1, 1, 0, 0, 0],

	                    [0, 0, 1, 0, 0, 1, 0, 0],

	                    [0, 1, 0, 0, 0, 0, 1, 0],

	                    [0, 0, 0, 0, 0, 0, 0, 0]
	                ],

	                [ //cbsGridLine

	                    [1, 1, 1, 1, 1, 1, 1, 1],

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [1, 1, 1, 1, 1, 1, 1, 1],

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [1, 1, 1, 1, 1, 1, 1, 1],

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [1, 1, 1, 1, 1, 1, 1, 1],

	                    [1, 0, 1, 0, 1, 0, 1, 0]
	                ],

	                [ //cbsDiagBlock

	                    [1, 0, 0, 1, 1, 0, 0, 1],

	                    [0, 1, 1, 0, 0, 1, 1, 0],

	                    [0, 1, 1, 0, 0, 1, 1, 0],

	                    [1, 0, 0, 1, 1, 0, 0, 1],

	                    [1, 0, 0, 1, 1, 0, 0, 1],

	                    [0, 1, 1, 0, 0, 1, 1, 0],

	                    [0, 1, 1, 0, 0, 1, 1, 0],

	                    [1, 0, 0, 1, 1, 0, 0, 1]
	                ],

	                [ //cbsHorzDiagBlock

	                    [1, 1, 0, 0, 1, 1, 0, 0],

	                    [0, 0, 1, 1, 0, 0, 1, 1],

	                    [1, 1, 0, 0, 1, 1, 0, 0],

	                    [0, 0, 1, 1, 0, 0, 1, 1],

	                    [1, 1, 0, 0, 1, 1, 0, 0],

	                    [0, 0, 1, 1, 0, 0, 1, 1],

	                    [1, 1, 0, 0, 1, 1, 0, 0],

	                    [0, 0, 1, 1, 0, 0, 1, 1]
	                ],

	                [ //cbsVertDiagBlock

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [0, 1, 0, 1, 0, 1, 0, 1],

	                    [0, 1, 0, 1, 0, 1, 0, 1],

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [1, 0, 1, 0, 1, 0, 1, 0],

	                    [0, 1, 0, 1, 0, 1, 0, 1],

	                    [0, 1, 0, 1, 0, 1, 0, 1]
	                ]

	            ];
	            var oppositePatterns = [];
	            for (var i = 0; i < styleDatas.length; i++) {
	                oppositePatterns[i] = helper.patternCreater.createOpposite(styleDatas[i]);
	            }

	            helper.oppositePatterns = oppositePatterns;
	        }(BackStyleHelper));

	        domain.BackStyleHelper = BackStyleHelper;
	    }(util));

	    /**
	     * 空方法
	     * @static
	     */
	    util.emptyFunction = function() {};
	    util.needOverride = function() { throw new Error('方法需要被重写'); };

	    Function.emptyFunction = function() {};
	    Function.needOverride = function() { throw new Error('方法需要被重写'); };

	    return util;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));


/***/ },
/* 4 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(5),
	    __webpack_require__(6),
	    __webpack_require__(7),
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Map, PropertyChangeEvent, PropertyChangeListenerProxy) {
	    'use strict';
	    
	    var IndexedPropertyChangeEvent = function(source, propertyName, oldValue, newValue, index) {
	        IndexedPropertyChangeEvent.superclass.constructor.call(this, source, propertyName, oldValue, newValue);
	        this.index = index;
	    };
	    //static properties
	    util.defineClass(IndexedPropertyChangeEvent, PropertyChangeEvent, {
	        getIndex: function() {
	            return this.index;
	        }
	    });


	    var PropertyChangeSupport = function(sourceBean) {
	        PropertyChangeSupport.superclass.constructor.call(this);
	        this.listeners;
	        this.source = sourceBean;
	    };
	    //static properties
	    util.defineClass(PropertyChangeSupport, Object, {
	        addPropertyChangeListener: function(arg1, arg2) {
	            if (arg1 == null) {
	                return;
	            }
	            if (arg2 == null) {
	                if (util.isInstanceOf(arg1, PropertyChangeListenerProxy)) {
	                    this.addPropertyChangeListener(arg1.getPropertyName(), arg1.getListener());
	                } else {
	                    if (this.listeners == null) {
	                        this.listeners = [];
	                    }
	                    this.listeners.push(arg1);
	                }
	            } else {
	                var propertyName = arg1;
	                var listener = arg2;
	                if (this.children == null) {
	                    this.children = new Map();
	                }
	                var child = this.children.get(propertyName);
	                if (child == null) {
	                    child = new PropertyChangeSupport(this.source);
	                    this.children.put(propertyName, child);
	                }
	                child.addPropertyChangeListener(listener);
	            }
	        },
	        removePropertyChangeListener: function(arg1, arg2) {
	            if (arg1 == null) {
	                return;
	            }
	            if (arg2 == null) {
	                if (util.isInstanceOf(arg1, PropertyChangeListenerProxy)) {
	                    this.removePropertyChangeListener(arg1.getPropertyName(), arg1.getListener());
	                } else {
	                    if (this.listeners == null) {
	                        return;
	                    }
	                    util.Array.removeItem(this.listeners, arg1);
	                }
	            } else {
	                var propertyName = arg1;
	                var listener = arg2;
	                if (this.children == null) {
	                    return;
	                }
	                var child = this.children.get(propertyName);
	                if (child == null) {
	                    return;
	                }
	                child.removePropertyChangeListener(listener);
	            }
	        },

	        getPropertyChangeListeners: function(propertyName) {
	            var returnList = null;

	            if (propertyName == null) {

	                if (this.listeners != null) {
	                    returnList = this.listeners;
	                } else {
	                    returnList = [];
	                }

	                if (this.children != null) {
	                    var iterator = this.children.keySetIterator();
	                    while (iterator.hasNext()) {
	                        var key = iterator.next();
	                        var child = this.children.get(key);
	                        var childListeners = child.getPropertyChangeListeners();
	                        for (var index = childListeners.length - 1; index >= 0; index--) {
	                            returnList.push(new PropertyChangeListenerProxy(key, childListeners[index]));
	                        }
	                    }
	                }
	            } else {
	                returnList = [];
	                if (this.children != null) {
	                    var support = this.children.get(propertyName);
	                    if (support != null) {
	                        util.Array.addAll(returnList, support.getPropertyChangeListeners());
	                    }
	                }
	            }
	            return returnList;

	        },
	        firePropertyChange: function(arg1, arg2, arg3) {
	            if (arguments.length == 3) {
	                var propertyName = arg1;
	                var oldValue = arg2;
	                var newValue = arg3;
	                if (oldValue != null && newValue != null && oldValue == newValue) {
	                    return;
	                }
	                this.firePropertyChange(new PropertyChangeEvent(this.source, propertyName, oldValue, newValue));
	            } else {
	                var evt = arg1;
	                var oldValue = evt.getOldValue();
	                var newValue = evt.getNewValue();
	                var propertyName = evt.getPropertyName();
	                if (oldValue != null && newValue != null && oldValue == newValue) {
	                    return;
	                }
	                if (this.listeners != null) {
	                    for (var i = 0; i < this.listeners.length; i++) {
	                        this.listeners[i].propertyChange(evt);
	                    }
	                }
	                if (this.children != null && propertyName != null) {
	                    var child = this.children.get(propertyName);
	                    if (child != null) {
	                        child.firePropertyChange(evt);
	                    }
	                }
	            }
	        },
	        fireIndexedPropertyChange: function(propertyName, index, oldValue, newValue) {
	            if (oldValue == newValue) {
	                return;
	            }
	            this.firePropertyChange(new IndexedPropertyChangeEvent(this.source, propertyName, oldValue, newValue, index));
	        },
	        hasListeners: function(propertyName) {
	            if (this.listeners != null && this.listeners.length != 0) {
	                return true;
	            }
	            if (this.children != null && propertyName != null) {
	                var child = this.children.get(propertyName);
	                if (child != null && child.listeners != null) {
	                    return child.listeners.length > 0;
	                }
	            }
	            return false;
	        }
	    });

	    return PropertyChangeSupport;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));


/***/ },
/* 5 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-8
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    //MapIterator internal
	    function MapIterator(items, which) {
	        this._items = items;
	        if (which == "key") {
	            this._index = 0;
	        } else {
	            this._index = 1;
	        }
	    }

	    MapIterator.prototype.next = function() {
	        var result = this._items[this._index];
	        this._index += 2;
	        return result;
	    };

	    MapIterator.prototype.hasNext = function() {
	        if (!this._items) {
	            return false;
	        }
	        if (this._index + 2 <= this._items.length) {
	            return true;
	        } else {
	            return false;
	        }
	    };

	    MapIterator.prototype.init = function(items, which) {
	        this._items = items;
	        if (which == "key") {
	            this._index = 0;
	        } else {
	            this._index = 1;
	        }
	    };


	    var Map = function() {
	        Map.superclass.constructor.call(this);

	        this.map = [];
	        this.length = 0;
	    };


	    //static properties
	    util.defineClass(Map, Object, {
	        size: function() {
	            return this.length;
	        },

	        put: function(key, value) {
	            var index = this.containsKey(key);
	            if (index >= 0) {
	                this.map[index + 1] = value;
	            } else {
	                ++this.length;
	                this.map.push(key);
	                this.map.push(value);
	            }
	        },

	        remove: function(key) {
	            var index = this.containsKey(key);
	            if (index >= 0) {
	                --this.length;
	                var result = this.map[index + 1];
	                this.map.splice(index, 2);
	                return result;
	            } else {
	                return false;
	            }
	        },

	        containsKey: function(key) {
	            var i;
	            for (i = 0; i < this.map.length; i += 2) {
	                if (this.map[i] == key) {
	                    return i;
	                }
	            }
	            return -1;

	        },

	        get: function(key) {
	            var index = this.containsKey(key);
	            if (index >= 0) {
	                return this.map[index + 1];
	            }
	        },

	        isEmpty: function() {
	            return this.length == 0;
	        },
	        clear: function() {
	            this.map = [];
	            this.length = 0;
	        },

	        filter: function(fn) {
	            var result = [];
	            for (var i = 0; i < this.map.length; i += 2) {
	                if (fn(this.map[i + 1], this.map[i])) {
	                    result.push(this.map[i]);
	                }
	            }
	            return result;
	        },
	        keySetIterator: function() {
	            return new MapIterator(this.map, "key");
	        },

	        valueSetIterator: function() {
	            return new MapIterator(this.map, "value");
	        }
	    });

	    return Map;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 6 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(util) {

	  var PropertyChangeEvent = function(source, propertyName, oldValue, newValue) {
	      this.source = source;
	      this.propertyName = propertyName;
	      this.newValue = newValue;
	      this.oldValue = oldValue;

	  };
	  //static properties
	  util.defineClass(PropertyChangeEvent, Object, {
	      getPropertyName: function() {
	          return this.propertyName;
	      },
	      getNewValue: function() {
	          return this.newValue;
	      },
	      getOldValue: function() {
	          return this.oldValue;
	      },
	      setPropagationId: function(propagationId) {
	          this.propagationId = propagationId;
	      },
	      getPropagationId: function() {
	          return this.propagationId;
	      },
	      getSource: function() {
	          return this.source;
	      }
	  });

	  return PropertyChangeEvent;

	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));


/***/ },
/* 7 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(util) {
	    'use strict';

	    var PropertyChangeListenerProxy = function(propertyName, listener) {
	        PropertyChangeListenerProxy.superclass.constructor.call(this);
	        this.propertyName = propertyName;
	        this.listener = listener;
	    };
	    //static properties
	    util.defineClass(PropertyChangeListenerProxy, Object, {
	        getListener: function() {
	            return this.listener;
	        },
	        getPropertyName: function() {
	            return this.propertyName;
	        },
	        propertyChange: function(evt) {
	            this.getListener().propertyChange(evt);
	        }
	    });

	    return PropertyChangeListenerProxy;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));


/***/ },
/* 8 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-8
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(9)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Point) {
	    //  'use strict';

	    var Html5Event = function(source) {
	        Html5Event.superclass.constructor.call(this);

	        this.source = source;
	        this.button = null; //1为左键
	        this.stateMask = null; //???
	        this.x = null;
	        this.y = null;
	        this.keyCode = null;
	        this.character = null;
	    };

	    //static properties
	    util.defineClass(Html5Event, Object, {

	        getSource: function() {
	            return this.source;
	        },
	        setLocation: function(arg1, arg2) {
	            if (arg1 == null) {
	                return;
	            }
	            if (util.isInstanceOf(arg1, Point)) {
	                this.x = arg1.x;
	                this.y = arg1.y;
	            } else {
	                this.x = arg1;
	                this.y = arg2;
	            }
	        },
	        getLocation: function() {
	            return new Point(this.x, this.y);
	        }
	    });

	    return Html5Event;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 9 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	//Point与Dimension和Rectangle模块循环依赖，解决办法如下：
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(10),
	    __webpack_require__(11),
	    __webpack_require__(12)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Dimension, PositionConstants, Rectangle) {
	    'use strict';

	    /**
	     * 点
	     * @class 点
	     * @constructor
	     * @return 一个点
	     */
	    var Point = function(arg1, arg2) {
	        Point.superclass.constructor.call(this);

	        if (arg1 == null) {
	            this.x = 0;
	            this.y = 0;
	            return;
	        }
	        if (util.isInstanceOf(arg1, Point)) {
	            this.x = arg1.x;
	            this.y = arg1.y;
	        } else if (arg1 != null && arg2 != null) {
	            /**
	             * @type Number
	             */
	            this.x = arg1;
	            /**
	             * @type Number
	             */
	            this.y = arg2;
	        }
	    };

	    util.defineClass(Point, Object, {
	        /**
	         * 判断与另一个点是否相等
	         * @param {Point} o 另一个点
	         * @returns 是否相等
	         * @type boolean
	         */
	        equals: function(o) {
	            if (o == null) return false;
	            if (util.isInstanceOf(o, Point)) {
	                return o.x == this.x && o.y == this.y;
	            }
	            return false;
	        },
	        /**
	         * 得到本点的拷贝
	         * @returns 一个新的点
	         * @type Point
	         */
	        getCopy: function() {
	            return new Point(this);
	        },
	        /**
	         * 得到与另一个点之间的矢量距离
	         * @param {Point} pt 另一个点
	         * @returns 矢量距离
	         * @type Dimension
	         */
	        getDifference: function(pt) {
	            var Dimension = __webpack_require__(10);
	            return new Dimension(this.x - pt.x, this.y - pt.y);
	        },
	        /**
	         * 得到与另一个点之间的距离值
	         * @param {Point} 另一个点
	         * @returns 两点之间的距离值
	         * @type Number
	         */
	        getDistance: function(pt) {
	            return Math.sqrt(this.getPreciseDistance2(pt));
	        },
	        /**
	         * 快速得到与另一个点之间的距离值的平方（先取整再计算）
	         * @param {Point} 另一个点
	         * @returns 两点之间的距离值的平方
	         * @type Number
	         */
	        getDistance2: function(pt) {
	            var i = Math.floor(pt.x - this.x);
	            var j = Math.floor(pt.y - this.y);
	            var result = i * i + j * j;

	            return result;
	        },
	        /**
	         * 得到与另一个点之间的距离值的平方（精确）
	         * @private
	         * @param {Point} 另一个点
	         * @returns 两点之间的距离值的平方
	         * @type Number
	         */
	        getPreciseDistance2: function(pt) {
	            var i = pt.x - this.x;
	            var j = pt.y - this.y;
	            var result = i * i + j * j;

	            return result;
	        },
	        /**
	         * 得到与另一个点之间的距离值的平方（精确）
	         * @param {Point} 另一个点
	         * @returns 两点之间的距离值的平方
	         * @type Number
	         */
	        getDistanceOrthogonal: function(pt) {
	            return Math.abs(this.y - pt.y) + Math.abs(this.x - pt.x);
	        },
	        /**
	         * 得到本点的相反值（与本点相对于原点对称）
	         * @returns 本点的相反值
	         * @type Point
	         */
	        getNegated: function() {
	            return this.getCopy().negate();
	        },
	        /**
	         * 得到另一个点相对于本点的位置
	         * @returns WEST|EAST|NORTH|SOUTH 具体取值参见<a href="PositionConstants">PositionConstants</a>
	         * @type Int
	         */
	        getPosition: function(p) {
	            var dx = p.x - this.x;
	            var dy = p.y - this.y;
	            if (Math.abs(dx) > Math.abs(dy)) {
	                if (dx < 0) {
	                    return PositionConstants.WEST;
	                }
	                return PositionConstants.EAST;
	            }
	            if (dy < 0) {
	                return PositionConstants.NORTH;
	            }
	            return PositionConstants.SOUTH;
	        },
	        /**
	         * 得到一个新的点，并在本点的基础上进行缩放
	         * @param {Number} amout 缩放比例
	         * @returns 缩放后的新点
	         * @type Point
	         */
	        getScaled: function(amount) {
	            return this.getCopy().scale(amount);
	        },
	        /**
	         * 得到一个新的点，并在本点的基础上进行移动
	         * @param {Number|Point|Dimension} arg1 横向移动值|移动值|移动值
	         * @param {Number|null} arg2 纵向移动值
	         * @returns 移动后的新点
	         * @type Point
	         */
	        getTranslated: function(arg1, arg2) {
	            if (arguments.length == 1) {
	                return this.getCopy().translate(arg1);
	            } else if (arguments.length == 2) {
	                return this.getCopy().translate(arg1, arg2);
	            }
	        },
	        /**
	         * 得到一个新的点，并在本点的基础上进行变换(横纵坐标互换)
	         * @returns 变换后的新点
	         * @type Point
	         */
	        getTransposed: function() {
	            return this.getCopy().transpose();
	        },
	        /**
	         * 对本点取反
	         * @returns 取反后的本点
	         * @type Point
	         */
	        negate: function() {
	            this.x = -this.x;
	            this.y = -this.y;
	            return this;
	        },
	        /**
	         * 对本点进行缩放
	         * @param {Number} factor 缩放比例
	         * @returns 缩放后的本点
	         * @type Point
	         */
	        performScale: function(factor) {
	            return this.scale(factor);
	        },
	        /**
	         * 对本点进行移动
	         * @param {Number|Point|Dimension} dx 横向移动值|移动值|移动值
	         * @param {Number|null} dy 纵向移动值
	         * @returns 移动后的本点
	         * @type Point
	         */
	        performTranslate: function(dx, dy) {
	            return this.translate(dx, dy);
	        },
	        /**
	         * 对本点的坐标值进行缩放
	         * @param {Number} factor 缩放比例
	         * @returns 缩放后的本点
	         * @type Point
	         */
	        scale: function(arg1, arg2) {
	            var amountX;
	            var amountY;
	            amountX = arg1;
	            if (typeof arg2 == "undefined") {
	                amountY = arg1;
	            } else {
	                amountY = arg2;
	            }
	            this.x = Math.floor(this.x * amountX);
	            this.y = Math.floor(this.y * amountY);
	            return this;
	        },
	        /**
	         * 设置位置
	         * @param {Number|Point} arg1 新位置的X坐标|新位置
	         * @param {Number|null} arg2 新位置的Y坐标
	         * @returns 设置位置之后的本点
	         * @type Point
	         */
	        setLocation: function(arg1, arg2) {
	            if (arg1 == null) return;
	            if (util.isInstanceOf(arg1, Point)) {
	                this.x = arg1.x;
	                this.y = arg1.y;
	            } else if (arg2 != null) {
	                this.x = arg1;
	                this.y = arg2;
	            }
	            return this;
	        },
	        /**
	         * 移动本点
	         * @param {Number|Point|Dimension} arg1 横向移动值|移动值|移动值
	         * @param {Number|null} arg2 纵向移动值
	         * @returns 移动之后的本点
	         * @type Point
	         */
	        translate: function(arg1, arg2) {
	            if (arg1 == null) return;
	            if (util.isInstanceOf(arg1, Point)) {
	                this.x += arg1.x;
	                this.y += arg1.y;
	            } else if (util.isInstanceOf(arg1, __webpack_require__(10))) {
	                this.x += arg1.width;
	                this.y += arg1.height;
	            } else if (arg2 != null) {
	                this.x += arg1;
	                this.y += arg2;
	            }
	            return this;
	        },
	        /**
	         * 变换（横纵坐标互换）
	         * @returns 变换之后的本点
	         * @type Point
	         */
	        transpose: function() {
	            var temp = this.x;
	            this.x = this.y;
	            this.y = temp;
	            return this;
	        }
	    });
	    //static properties

	    /**
	     * 得到坐标较大的一个点
	     * @static
	     * @param {Point} p1 待比较的第一个点
	     * @param {Point} p2 待比较的第二个点
	     * @returns 坐标较大的一个点
	     * @type Point
	     */
	    Point.max = function(p1, p2) {
	        var Rectangle = __webpack_require__(12);
	        return new Rectangle(p1, p2).getBottomRight().translate(-1, -1);
	    };
	    /**
	     * 得到坐标较小的一个点
	     * @static
	     * @param {Point} p1 待比较的第一个点
	     * @param {Point} p2 待比较的第二个点
	     * @returns 坐标较小的一个点
	     * @type Point
	     */
	    Point.min = function(p1, p2) {
	        var Rectangle = __webpack_require__(12);
	        return new Rectangle(p1, p2).getTopLeft();
	    };
	    /**
	     * 单例
	     * @static
	     * @type Point
	     */
	    Point.SINGLETON = new Point(0, 0);

	    return Point;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 10 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; /**
	  * @author jiangqifan
	  * @since 2016-6-8
	  */
	 //与Point循环依赖
	 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	     __webpack_require__,
	     __webpack_require__(3),
	     __webpack_require__(9)
	 ], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Point) {
	     'use strict';

	     /**
	      * 大小
	      * @class 大小
	      * @constructor
	      * @return 一个大小对象
	      */
	     var Dimension = function(arg1, arg2) {
	         Dimension.superclass.constructor.call(this);
	         if (arg1 == null) {
	             this.width = 0;
	             this.height = 0;
	             return;
	         }
	         if (util.isInstanceOf(arg1, Dimension)) {
	             this.width = arg1.width;
	             this.height = arg1.height;
	         } else if (util.isInstanceOf(arg1, __webpack_require__(9))) {
	             this.width = arg1.x;
	             this.height = arg1.y;
	         } else {
	             /**
	              * @type Number
	              */
	             this.width = arg1;
	             /**
	              * @type Number
	              */
	             this.height = arg2;
	         }

	     };

	     util.defineClass(Dimension, Object, {
	         /**
	          * 是否包含另一个大小（两个大小可以相等）
	          * @param {Dimension} d 另一个大小
	          * @returns 是否包含
	          * @type boolean
	          */
	         contains: function(d) {
	             return this.width >= d.width && this.height >= d.height;
	         },
	         /**
	          * 是否包含另一个大小(不包括相等)
	          * @param {Dimension} d 另一个大小
	          * @returns 是否包含
	          * @type boolean
	          */
	         containsProper: function(d) {
	             return this.width > d.width && this.height > d.height;
	         },
	         /**
	          * 两个大小是否相等
	          * @param {Dimension} d 另一个大小
	          * @returns 是否相等
	          * @type boolean
	          */
	         equals: function(d) {
	             if (d == null) {
	                 return false;
	             }
	             if (arguments.length == 1) {
	                 var d = arguments[0];
	                 return d.width == this.width && d.height == this.height;
	             } else if (arguments.length == 2) {
	                 return arguments[0] == this.width && arguments[1] == this.height;
	             }
	         },
	         /**
	          * 对本大小进行扩展
	          * @param {Number|Dimension} arg2 横向扩展值|扩展的大小
	          * @param {Number|null} arg2 纵向扩展值
	          * @returns 是否相等
	          * @type boolean
	          */
	         expand: function(arg1, arg2) {
	             if (typeof arg1 == "undefined") return this;
	             if (util.isInstanceOf(arg1, Dimension)) {
	                 this.width += arg1.width;
	                 this.height += arg1.height;
	             } else if (util.isInstanceOf(arg1, __webpack_require__(9))) {
	                 this.width += arg1.x;
	                 this.height += arg1.y;
	             } else if (arguments.length == 2) {
	                 this.width += arg1;
	                 this.height += arg2;
	             }
	             return this;
	         },
	         /**
	          * 本大小的面积
	          * @returns 本打的面积
	          * @type Number
	          */
	         getArea: function() {
	             return this.width * this.height;
	         },
	         /**
	          * 得到本大小的一个拷贝
	          * @returns 本大小的一个拷贝
	          * @type Dimension
	          */
	         getCopy: function() {
	             return new Dimension(this);
	         },
	         /**
	          * 两个大小的差值
	          * @param {Dimension} d 另一个大小
	          * @returns 两个大小的差值
	          * @type Dimension
	          */
	         getDifference: function(d) {
	             return new Dimension(this.width - d.width, this.height - d.height);
	         },
	         /**
	          * 得到一个新的大小，并将在本大小的基础上其进行扩展
	          * @param {Number|Dimension} d 需扩展的宽度|需扩展的大小
	          * @param {Number} height 需扩展的高度
	          * @returns 新的大小
	          * @type Dimension
	          */
	         getExpanded: function(d, height) {
	             var width;
	             if (arguments.length == 1) {
	                 width = d.width;
	                 height = d.height;
	             } else if (arguments.length == 2) {
	                 width = d;
	                 //  height = height;
	             }
	             return new Dimension(this.width + width, this.height + height);
	         },
	         /**
	          * 两个大小的交集(宽度为两个大小的最小宽度，高度为两个大小的最小高度)
	          * @param {Dimension} d 另一个大小
	          * @returns 两个大小的交集
	          * @type Dimension
	          */
	         getIntersected: function(d) {
	             return new Dimension(this).intersect(d);
	         },
	         /**
	          * 大小的相反值
	          * @returns 新的大小（为本大小的相反值）
	          * @type Dimension
	          */
	         getNegated: function() {
	             return new Dimension(0 - this.width, 0 - this.height);
	         },
	         /**
	          * 得到一个新的大小，并将其在本大小的基础上进行缩放
	          * @param {Number} amount 缩放比例
	          * @returns 新的大小
	          * @type Dimension
	          */
	         getScaled: function(amount) {
	             return new Dimension(this).scale(amount);
	         },
	         /**
	          *
	          */
	         getShrinked: function(arg1, arg2) {
	             if (arg1 == null) {
	                 return;
	             }
	             if (util.isInstanceOf(arg1, Dimension)) {
	                 return this.getCopy().shrink(arg1.width, arg1.height);
	             } else {
	                 return this.getCopy().shrink(arg1, arg2);
	             }
	         },
	         /**
	          * 得到一个新的大小，并将其在本大小的基础上进行变换(高宽互换);
	          * @returns 新的大小
	          * @type Dimension
	          */
	         getTransposed: function() {
	             return new Dimension(this).transpose();
	         },
	         /**
	          * 得到两个大小的并集（宽为两个大小最大之宽，高为两个大小最大之宽）
	          * @returns 新的大小
	          * @type Dimension
	          */
	         getUnioned: function(d) {
	             return new Dimension(this).union(d);
	         },
	         /**
	          * 本大小与另一个大小求交集
	          * @returns 本大小
	          * @type Dimension
	          */
	         intersect: function(d) {
	             this.width = Math.min(d.width, this.width);
	             this.height = Math.min(d.height, this.height);
	             return this;
	         },
	         /**
	          * 本大小是否为空(高宽为正数)
	          * @returns 是否为空
	          * @type boolean
	          */
	         isEmpty: function() {
	             return (this.width <= 0) || (this.height <= 0);
	             //return !((this.width > 0) && (this.height > 0));
	         },
	         /**
	          * 对本大小求反
	          * @returns 求反后的本大小
	          * @type Dimension
	          */
	         negate: function() {
	             this.width = 0 - this.width;
	             this.height = 0 - this.height;
	             return this;
	         },
	         /**
	          * 对本大小进行缩放
	          * @returns 缩放后的本大小
	          * @type Dimension
	          */
	         performScale: function(factor) {
	             return this.scale(factor);
	         },
	         performTranslate: function() {
	             //do nothing.
	         },
	         /**
	          * 对本大小进行缩放（当只提供横向缩放比例时，纵向也按照相同比例进行缩放）
	          * @param {Number} h 横向缩放比例
	          * @param {Number|null} v 纵向缩放比例
	          * @returns 缩放后的本大小
	          * @type Dimension
	          */
	         scale: function() {
	             var w;
	             var h;
	             if (arguments.length == 1) {
	                 w = arguments[0];
	                 h = w;
	             } else if (arguments.length == 2) {
	                 w = arguments[0];
	                 h = arguments[1];
	             }
	             this.width = Math.floor(this.width * w);
	             this.height = Math.floor(this.height * h);
	             return this;
	         },
	         /**
	          * 设置本大小的值
	          * @param {Dimension} d 新的值
	          * @returns 改变之后的本大小
	          * @type Dimension
	          */
	         setSize: function(d) {
	             this.width = d.width;
	             this.height = d.height;
	         },
	         /**
	          * 对本大小进行收缩
	          * @param {Number} w 宽度收缩值
	          * @param {Number} h 高度收缩值
	          * @returns 改变之后的本大小
	          * @type Dimension
	          */
	         shrink: function(w, h) {
	             return this.expand(-w, -h);
	         },
	         /**
	          * 进入如下变换(宽高互换)
	          * @returns 变换之后的本大小
	          * @type Dimension
	          */
	         transpose: function() {
	             var temp = this.width;
	             this.width = this.height;
	             this.height = temp;
	             return this;
	         },
	         /**
	          * 对本大小与另一个大小的并集（宽为两个大小最大之宽，高为两个大小最大之宽）
	          * @param {Dimension} d 另一个大小
	          * @returns 改变之后的本大小
	          * @type Dimension
	          */
	         union: function(d) {
	             this.width = Math.max(this.width, d.width);
	             this.height = Math.max(this.height, d.height);
	             return this;
	         }
	     });
	     /**
	      * 单例
	      * @static
	      * @type Dimension
	      */
	     Dimension.SINGLETON = new Dimension();
	     Dimension.max = function(d1, d2) {
	         return new Dimension(Math.max(d1.width, d2.width), Math.max(d1.height, d2.height));
	     };
	     Dimension.min = function(d1, d2) {
	         return new Dimension(Math.min(d1.width, d2.width), Math.min(d1.height, d2.height));
	     };

	     return Dimension;
	 }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 11 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require) {
	    'use strict';

	    /**
	     * @class 提供一些常用的位置值
	     * @constructor
	     */
	    var PositionConstants = {};

	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.NONE = 0;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.LEFT = 1;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.CENTER = 2;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.RIGHT = 4;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.LEFT_CENTER_RIGHT = PositionConstants.LEFT | PositionConstants.CENTER | PositionConstants.RIGHT;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.ALWAYS_LEFT = 64;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.ALWAYS_RIGHT = 128;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.TOP = 8;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.MIDDLE = 16;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.BOTTOM = 32;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.TOP_MIDDLE_BOTTOM = PositionConstants.TOP | PositionConstants.MIDDLE | PositionConstants.BOTTOM;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.NORTH = 1;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.SOUTH = 4;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.WEST = 8;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.EAST = 16;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.HORIZONTAL = 64;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.VERTICAL = 128;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.NORTH_EAST = PositionConstants.NORTH | PositionConstants.EAST;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.NORTH_WEST = PositionConstants.NORTH | PositionConstants.WEST;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.SOUTH_EAST = PositionConstants.SOUTH | PositionConstants.EAST;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.SOUTH_WEST = PositionConstants.SOUTH | PositionConstants.WEST;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.NORTH_SOUTH = PositionConstants.NORTH | PositionConstants.SOUTH;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.EAST_WEST = PositionConstants.EAST | PositionConstants.WEST;
	    /**
	     * @static
	     * @type Int
	     */
	    PositionConstants.NSEW = PositionConstants.NORTH_SOUTH | PositionConstants.EAST_WEST;

	    //PositionConstants.HORIZONTAL = 0;

	    //PositionConstants.VERTICAL = 1;

	    return PositionConstants;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 12 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-8
	 */
	//与Point循环依赖
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(10),
	    __webpack_require__(13),
	    __webpack_require__(9),
	    __webpack_require__(11)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Dimension, Insets, Point, PositionConstants) {
	    'use strict';

	    /**
	     * 矩形
	     * @class 矩形
	     * @constructor
	     * @return 一个矩形
	     */
	    var Rectangle = function(x, y, width, height) {
	        Rectangle.superclass.constructor.call(this);

	        if (x == null) {
	            this.x = 0;
	            this.y = 0;
	            this.width = 0;
	            this.height = 0;
	        } else if (util.isInstanceOf(x, Rectangle)) {
	            this.x = x.x;
	            this.y = x.y;
	            this.width = x.width;
	            this.height = x.height;
	        } else if (util.isInstanceOf(x, __webpack_require__(9)) && util.isInstanceOf(y, __webpack_require__(9))) {
	            this.x = Math.min(x.x, y.x);
	            this.y = Math.min(x.y, y.y);
	            this.width = Math.abs(y.x - x.x) + 1;
	            this.height = Math.abs(y.y - x.y) + 1;
	        } else if (util.isInstanceOf(x, __webpack_require__(9)) && util.isInstanceOf(y, Dimension)) {
	            this.x = x.x;
	            this.y = x.y;
	            this.width = y.width;
	            this.height = y.height;
	        } else {
	            /**
	             * @type Number
	             * @field
	             */
	            this.x = x;
	            /**
	             * @type Number
	             * @field
	             */
	            this.y = y;
	            /**
	             * @type Number
	             * @field
	             */
	            this.width = width;
	            /**
	             * @type Number
	             * @field
	             */
	            this.height = height;
	        }
	    };


	    //static properties
	    util.defineClass(Rectangle, Object, {
	        bottom: function() {
	            return this.y + this.height;
	        },
	        /**
	         * 测试另一个点或另一个矩形是否被本矩形包含
	         * containsPoint;
	         * contains(rectangle);
	         * contains(x,y);
	         * @param {Number|Point|Rectangle|} arg1 待测试的点的横坐标|待测试的点|待测试的矩形
	         * @param {Number|null} arg2 待测试的点的纵坐标
	         */
	        contains: function(arg1, arg2) {
	            if (arg1 != null) {
	                if (util.isInstanceOf(arg1, __webpack_require__(9))) {
	                    return this.contains(arg1.x, arg1.y);
	                } else if (util.isInstanceOf(arg1, Rectangle)) {
	                    return this.x <= arg1.x && this.y <= arg1.y && this.right() >= arg1.right() && this.bottom() >= arg1.bottom();
	                } else if (arg2 != null) {
	                    return arg2 >= this.y && arg2 <= this.y + this.height && arg1 >= this.x && arg1 <= this.x + this.width;
	                }
	            }
	        },
	        copy: function() {
	            return new Rectangle(this.x, this.y, this.width, this.height);
	        },
	        /**
	         * 剪掉insets部分
	         * @param {Insets} insets 待剪掉的区域
	         */
	        crop: function(insets) {
	            if (!insets) {
	                return this;
	            }
	            this.x += insets.left;
	            this.y += insets.top;
	            this.width -= (insets.getWidth());
	            this.height -= (insets.getHeight());
	            return this;
	        },
	        /**
	         * 是否与另一个矩形相等
	         * @param {Rectangle} o 另一个矩形
	         * @returns 是否相等
	         * @type boolean
	         */
	        equals: function(o) {
	            if (o == null) return false;
	            if (this == o) return true;
	            if (util.isInstanceOf(o, Rectangle)) {
	                return this.x == o.x && this.y == o.y && this.width == o.width && this.height == o.height;
	            }
	            return false;
	        },

	        /**
	         * 将矩形向外扩展
	         * expaned(insets);
	         * expand(expand_width,expaned_height);
	         * @param {Number|Insets} arg1 横向扩展值|需要扩展的Insets
	         * @param {Number|null} arg2 纵向扩展值
	         * @returns 扩展之后的本对象
	         * @type Rectangle
	         */
	        expand: function(arg1, arg2) {
	            if (arg1 != null) {
	                if (util.isInstanceOf(arg1, Insets)) {
	                    this.x -= arg1.left;
	                    this.y -= arg1.top;
	                    this.height += arg1.getHeight();
	                    this.width += arg1.getWidth();
	                    return this;
	                } else if (arg2 != null) {
	                    return this.shrink(-arg1, -arg2);
	                }
	                return this;
	            }
	            return this;
	        },
	        /**
	         * 得到底部中间的位置
	         * @returns 矩形底部中间位置的坐标
	         * @type Point
	         */
	        getBottom: function() {
	            var Point = __webpack_require__(9);
	            return new Point(this.x + this.width / 2, this.bottom());
	        },
	        /**
	         * 得到左下角的位置
	         * @returns 矩形左下角的坐标
	         * @type Point
	         */
	        getBottomLeft: function() {
	            var Point = __webpack_require__(9);
	            return new Point(this.x, this.y + this.height);
	        },
	        /**
	         * 得到右下角的位置
	         * @returns 矩形右下角的坐标
	         * @type Point
	         */
	        getBottomRight: function() {
	            var Point = __webpack_require__(9);
	            return new Point(this.x + this.width, this.y + this.height);
	        },
	        /**
	         * 得到矩形中心的位置
	         * @returns 矩形中心的坐标
	         * @type Point
	         */
	        getCenter: function() {
	            var Point = __webpack_require__(9);
	            return new Point(this.x + this.width / 2, this.y + this.height / 2);
	        },
	        /**
	         * 得到本矩形的拷贝
	         * @returns 本矩形的拷贝
	         * @type Rectangle
	         */
	        getCopy: function() {
	            return new Rectangle(this);
	        },

	        /**
	         * 得到一个新的修剪过的矩形
	         * @param {Insets} 修剪值
	         * @returns 新的修剪过的矩形
	         * @type Rectangle
	         */
	        getCropped: function(insets) {
	            var rect = new Rectangle(this);
	            rect.crop(insets);
	            return rect;
	        },
	        /**
	         * 得到一个新的扩展过的矩形
	         * @param {Number|Insets} arg1 横向扩展的值|需要扩展的值
	         * @param {Number|null} arg2 纵向扩展的值
	         * @returns 新的修剪过的矩形
	         * @type Rectangle
	         */
	        getExpanded: function(arg1, arg2) {
	            if (arguments.length == 1) {
	                return new Rectangle(this).expand(arg1);
	            } else if (arguments.length == 2) {
	                return new Rectangle(this).expand(arg1, arg2);
	            }
	        },

	        /**
	         * 得到输入矩形与该矩形的相交区域，结果作为一个新的矩形返回，如果无相交区域则返回空矩形
	         * @param {Rectangle} rect 其他矩形
	         * @returns 两矩形的相交区域
	         * @type Rectangle
	         */
	        getIntersection: function(rect) {
	            var x1 = Math.max(this.x, rect.x);
	            var x2 = Math.min(this.x + this.width, rect.x + rect.width);
	            var y1 = Math.max(this.y, rect.y);
	            var y2 = Math.min(this.y + this.height, rect, y + rect.height);
	            if ((x2 - x1) < 0 || (y2 - y1) < 0) {
	                return new Rectangle(0, 0, 0, 0);
	            } else {
	                return new Rectangle(x1, y1, x2 - x1, y2 - y1);
	            }
	        },
	        /**
	         * 得到矩形左边中间的位置
	         * @returns 矩形左边中间的坐标
	         * @type Point
	         */
	        getLeft: function() {
	            var Point = __webpack_require__(9);
	            return new Point(this.x, this.y + this.height / 2);
	        },

	        getInsets: function() {
	            if (this.getBorder()) {
	                //return this.getBorder().getInsets(this);
	            }
	            //return
	        },
	        /**
	         * 得到矩形的位置
	         * @returns 矩形左上角的坐标
	         * @type Point
	         */
	        getLocation: function() {
	            var Point = __webpack_require__(9);
	            return new Point(this.x, this.y);
	        },


	        /**
	         * 得到一个点相对于这个矩形的位置
	         * @param {Point} pt 一个点
	         * @return 点相对于此矩形的位置（EAST|WEST|SOUTH|NORTH|NONE）具体取值参考<a href="PositionConstants.html">PositionConstants</a>
	         * @see PositionConstants
	         * @type Int
	         */
	        getPosition: function(pt) {
	            var result = PositionConstants.NONE;
	            if (this.contains(pt)) {
	                return result;
	            }
	            if (pt.x < this.x) {
	                result = PositionConstants.WEST;
	            } else if (pt.x >= this.x + this.width) {
	                result = PositionConstants.EAST;
	            }

	            if (pt.y < this.y) {
	                result = result | PositionConstants.NORTH;
	            } else if (pt.y >= this.y + this.height) {
	                result = result | PositionConstants.SOUTH;
	            }

	            return result;
	        },
	        /**
	         * 得到一个新的矩形，并设置他的大小
	         * @param {Number|Dimension} arg2 新大小的宽度|新大小
	         * @param {Number|null} 新大小的高度
	         * @returns 新的矩形
	         * @type Rectangle
	         */
	        getResized: function(arg1, arg2) {
	            if (arguments.length == 1) {
	                return new Rectangle(this).resize(arg1);
	            } else if (arguments.length == 2) {
	                return new Rectangle(this).resize(arg1, arg2);
	            }
	        },
	        /**
	         * 得到矩形右边居中的位置
	         * @returns 矩形右边居中的位置
	         * @type Point
	         */
	        getRight: function() {
	            var Point = __webpack_require__(9);
	            return new Point(this.right(), this.y + this.height / 2);
	        },
	        /**
	         * 得到矩形的大小
	         * @returns 矩形的大小
	         * @type Point
	         */
	        getSize: function() {
	            return new Dimension(this.width, this.height);
	        },
	        /**
	         * 得到矩形顶部中间的位置
	         * @returns 矩形顶部的坐标
	         * @type Point
	         */
	        getTop: function() {
	            var Point = __webpack_require__(9);
	            return new Point(this.x + this.width / 2, this.y);
	        },
	        /**
	         * 得到矩形左上角的位置
	         * @returns 矩形左上角的坐标
	         * @type Point
	         */
	        getTopLeft: function() {
	            var Point = __webpack_require__(9);
	            return new Point(this.x, this.y);
	        },
	        /**
	         * 得到矩形右上角的位置
	         * @returns 矩形右上角的坐标
	         * @type Point
	         */
	        getTopRight: function() {
	            var Point = __webpack_require__(9);
	            return new Point(this.x + this.width, this.y);
	        },

	        /**
	         * 得到一个新的矩形，并移动他的位置
	         * @param {Number|Point} arg2 横向移动值|移动值
	         * @param {Number|null} 纵向移动值
	         * @returns 新的矩形
	         * @type Rectangle
	         */
	        getTranslated: function(arg1, arg2) {
	            if (arguments.length == 1) {
	                return new Rectangle(this).translate(arg1);
	            } else if (arguments.length == 2) {
	                return new Rectangle(this).translate(arg1, arg2);
	            }
	        },

	        /**
	         * 得到新的矩形，并将其进行变换(x、y坐标互换，宽高互换)
	         * @returns 新的矩形
	         * @type Rectangle
	         */
	        getTransposed: function() {
	            var r = new Rectangle(this);
	            r.transpose();
	            return r;
	        },
	        /**
	         * 得到能容纳本矩形与其他矩形的最小矩形
	         * @returns 新的矩形
	         * @type Rectangle
	         */
	        getUnion: function(rect) {
	            if (!rect || rect.isEmpty()) {
	                return new Rectangle(this);
	            }
	            var union = new Rectangle(Math.min(this.x, rect.x), Math.min(this.y, rect.y), 0, 0);
	            union.width = Math.max(this.x + this.width, rect.x + rect.width) - union.x;
	            union.height = Math.max(this.y + this.height, rect.y + rect.height) - union.y;
	            return union;
	        },

	        /**
	         * 本矩形与其他矩形相交
	         * @returns 本矩形
	         * @type Rectangle
	         */
	        intersect: function(rect) {
	            var x;
	            var y;
	            var width;
	            var height;
	            if (arguments.length == 1) {
	                x = rect.x;
	                y = rect.y;
	                width = rect.width;
	                height = rect.height;
	            } else if (arguments.length == 4) {
	                x = arguments[0];
	                y = arguments[1];
	                width = arguments[2];
	                height = arguments[3];
	            }
	            var x1 = Math.max(this.x, x);
	            var x2 = Math.min(this.x + this.width, x + width);
	            var y1 = Math.max(this.y, y);
	            var y2 = Math.min(this.y + this.height, y + height);
	            if (((x2 - x1) < 0) || ((y2 - y1) < 0))
	                this.x = this.y = this.width = this.height = 0; // No intersection
	            else {
	                this.x = x1;
	                this.y = y1;
	                this.width = x2 - x1;
	                this.height = y2 - y1;
	            }
	            return this;
	        },

	        /**
	         * 判断本矩形与其他矩形是否相交
	         * @returns 是否相交
	         * @type boolean
	         */
	        intersects: function(rect) {
	            return rect.x < this.x + this.width && rect.y < this.y + this.height && rect.x + rect.width > this.x && rect.y + rect.height > this.y;
	        },
	        /**
	         * 判断本矩形是否为空
	         * @returns 是否为空
	         * @type boolean
	         */
	        isEmpty: function() {
	            return this.width <= 0 || this.height <= 0;
	            //return !(this.width > 0 && this.height > 0 && !isNaN(this.x) && !isNaN(this.y));
	        },
	        /**
	         * 对本矩形进行缩放
	         * @param 缩放比例
	         */
	        performScale: function(factor) {
	            this.scale(factor);
	        },
	        /**
	         * 对本矩形执行移动
	         * @param {Number|Point} dx 横向移动值|移动值
	         * @param {Number|null} dy 纵向移动值
	         */
	        performTranslate: function(dx, dy) {
	            this.translate(dx, dy);
	        },
	        /**
	         * 修改本矩形的大小
	         * @param {Number|Dimension} arg1 新的宽度|新的大小
	         * @param {Number|null} arg2 新的高度
	         */
	        resize: function(arg1, arg2) {
	            if (typeof arg1 == "undefined") {
	                return this;
	            }
	            if (arguments.length == 1) {
	                if (util.isInstanceOf(arg1, Dimension)) {
	                    this.width += arg1.width;
	                    this.height += arg1.height;
	                }
	            } else if (arguments.length == 2) {
	                this.width += arg1;
	                this.height += arg2;
	            }
	            return this;

	        },
	        /**
	         * 得到矩形最右边的横坐标
	         * @returns 最右边的横坐标
	         * @type Number
	         */
	        right: function() {
	            return this.x + this.width;
	        },
	        /**
	         *  缩放。如果只传入横向缩放比例，则纵向也采用相同的缩放比例
	         *  @param {Number} x 横向缩放比例
	         *  @param {Number} y 纵向缩放比例
	         *  @returns 缩放后的本矩形
	         *  @type Rectangle
	         */
	        scale: function(arg1, arg2) {
	            var scaleX;
	            var scaleY;
	            if (arg1 == null) {
	                return;
	            }
	            if (arg2 == null) {
	                scaleX = arg1;
	                scaleY = arg1;
	            } else {
	                scaleX = arg1;
	                scaleY = arg2;
	            }
	            var oldX = this.x;
	            var oldY = this.y;
	            this.x = Math.floor(this.x * scaleX);
	            this.y = Math.floor(this.y * scaleY);
	            this.width = Math.ceil((oldX + this.width) * scaleX) - this.x;
	            this.height = Math.ceil((oldY + this.height) * scaleY) - this.y;
	            return this;
	        },
	        /**
	         * 设置边界
	         * @param {Rectangle} rect 新的边界值
	         * @returns 设置了新边界的本矩形
	         * @type Rectangle
	         */
	        setBounds: function(rect) {
	            this.x = rect.x;
	            this.y = rect.y;
	            this.width = rect.width;
	            this.height = rect.height;
	            return this;
	        },
	        /**
	         * 设置X坐标
	         * @param {Number} x 新的x坐标
	         */
	        setX: function(x) {
	            this.x = x;
	        },
	        /**
	         * 设置Y坐标
	         * @param {Number} y 新的Y坐标
	         */
	        setY: function(y) {
	            this.y = y;
	        },
	        /**
	         * 设置宽度
	         * @param {Number} width 新的宽度
	         */
	        setWidth: function(width) {
	            this.width = width;
	        },
	        /**
	         * 设置高度
	         * @param {Number} height 新的高度
	         */
	        setHeight: function(height) {
	            this.height = height;
	        },
	        /**
	         * 设置位置
	         * setLocation(Point);
	         * setLocation(x,y);
	         * @param {Number|Point} arg1 新位置的横坐标|新位置
	         * @param {Number|null} arg2 新位置的纵坐标
	         */
	        setLocation: function(arg1, arg2) {
	            if (arg1 == null) return;
	            if (util.isInstanceOf(arg1, __webpack_require__(9))) {
	                this.x = arg1.x;
	                this.y = arg1.y;
	            } else if (arguments.length == 2) {
	                this.x = arg1;
	                this.y = arg2;
	            }
	        },
	        /**
	         * 设置大小
	         * setSize(dimension);
	         * setSize(width,height);
	         * @param {Number|Dimension} arg1 新大小的宽度|新大小
	         * @param {Number|null} arg2 新大小的高度
	         */
	        setSize: function(arg1, arg2) {
	            if (arg1 == null) return;
	            if (util.isInstanceOf(arg1, Dimension)) {
	                this.width = arg1.width;
	                this.height = arg1.height;
	            } else if (arg2 != null) {
	                this.width = arg1;
	                this.height = arg2;
	            }
	        },
	        /**
	         * 收缩矩形，矩形的左边和右边都向中间移动h，上边和下边各向中间移动v
	         * @param {Number} h 横向收缩值
	         * @param {Number} v 纵向收缩值
	         * @returns 收缩后的本矩形
	         * @type Rectangle
	         */
	        shrink: function(h, v) {
	            this.x += h;
	            this.width -= (h + h);
	            this.y += v;
	            this.height -= (v + v);
	            return this;
	        },
	        /**
	         * 判断两矩形是否有接触
	         * @param {Rectangle} rect 另一个矩形
	         * @returns 两矩形是否有接触
	         * @type boolean
	         */
	        touches: function(rect) {
	            return rect.x <= this.x + this.width && rect.y <= this.y + this.height && rect.x + rect.width >= this.x && rect.y + rect.height >= this.y;
	        },
	        /**
	         * 移动矩形
	         * translate(deltaPoint);
	         * translate(x,y);
	         * @param {Number|Point} x 横向移动的距离|移动的横纵距离
	         * @param (Number|null) y 纵向移动的距离
	         * @returns 移动后的本矩形
	         * @type Rectangle
	         */
	        translate: function(x, y) {
	            if (x == null) return this;
	            if (util.isInstanceOf(x, __webpack_require__(9))) {
	                this.x += x.x;
	                this.y += x.y;
	            } else if (y != null) {
	                this.x += x;
	                this.y += y;
	            }
	            return this;
	        },
	        /**
	         * 做如下转换：横纵坐标互换；高宽互换
	         * @returns 转换后的本矩形
	         * @type Rectangle
	         */
	        transpose: function() {
	            var temp = this.x;
	            this.x = this.y;
	            this.y = temp;
	            temp = this.width;
	            this.width = this.height;
	            this.height = temp;
	            return this;
	        },
	        /**
	         * 扩展自己以容纳另一矩形或另一个点
	         * union(x, y);
	         * union(x, y, width, height);
	         * union(rectangle);
	         * @param {Number|Rectangle} 需容纳的点的横坐标|需容纳的矩形
	         * @param {Number|null}
	         * @param {Number|null}
	         * @param {Number|null}
	         * @returns 扩展后的本矩形
	         * @type Rectangle
	         */
	        union: function(arg1, arg2, arg3, arg4) {
	            var x;
	            var y;
	            var width;
	            var height;
	            if (arg1 == null) {
	                return this;
	            }
	            if (typeof arg1 === "number" && typeof arg2 === "number") {
	                x = arg1;
	                y = arg2;
	                width = arg3;
	                height = arg4;
	            } else {
	                x = arg1.x;
	                y = arg1.y;
	                width = arg1.width;
	                height = arg1.height;
	            }
	            if (width == null) {
	                width = 0;
	            }
	            if (height == null) {
	                height = 0;
	            }


	            var right = Math.max(this.x + this.width, x + width);
	            var bottom = Math.max(this.y + this.height, y + height);
	            this.x = Math.min(this.x, x);
	            this.y = Math.min(this.y, y);
	            this.width = right - this.x;
	            this.height = bottom - this.y;
	            return this;

	        }
	    });


	    /**
	     * 单例
	     * @static
	     * @type Rectangle
	     */
	    Rectangle.SINGLETON = new Rectangle();

	    return Rectangle;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 13 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    /**
	     * @param top
	     * @param left
	     * @param bottom
	     * @param right
	     */
	    var Insets = function(arg1, arg2, arg3, arg4) {
	        Insets.superclass.constructor.call(this);
	        if (arg1 == null) {
	            this.top = 0;
	            this.left = 0;
	            this.bottom = 0;
	            this.right = 0;
	            return;
	        }
	        if (util.isInstanceOf(arg1, Insets)) {
	            this.top = arg1.top;
	            this.left = arg1.left;
	            this.bottom = arg1.bottom;
	            this.right = arg1.right;
	        } else if (arg2 != null && arg3 != null && arg4 != null) {
	            this.top = arg1;
	            this.left = arg2;
	            this.bottom = arg3;
	            this.right = arg4;
	        } else {
	            this.top = arg1;
	            this.left = arg1;
	            this.bottom = arg1;
	            this.right = arg1;
	        }
	    };


	    //static properties
	    util.defineClass(Insets, Object, {
	        /**
	         * 添加插入值
	         * @param {Insets} insets 需添加的插入值
	         * @returns 添加之后的本插入值
	         * @type Insets
	         */
	        add: function(insets) {
	            this.top += insets.top;
	            this.left += insets.left;
	            this.bottom += insets.bottom;
	            this.right += insets.right;
	            return this;
	        },
	        /**
	         * 是否相等
	         * @param {Insets} o 另一个插入值
	         * @returns 是否相等
	         * @type boolean
	         */
	        equals: function(o) {
	            if (o == null) return false;
	            if (util.isInstanceOf(o, Insets)) {
	                return o.top == this.top && o.left == this.left && o.bottom == this.bottom && o.right == this.right;
	            }
	            return false;
	        },
	        /**
	         * 得到一个本插入值得拷贝，并对其进行添加
	         * @param {Insets} insets 需添加的插入值
	         * @returns 添加之后的新插入值
	         * @type Insets
	         */
	        getAdded: function(insets) {
	            return new Insets(this).add(insets);
	        },
	        /**
	         * 得到插入值的高度
	         * @returns 本插入值得高度
	         * @type Number
	         */
	        getHeight: function() {
	            return this.top + this.bottom;
	        },
	        /**
	         * 创建一个本插入值的拷贝，并对其进行转换（top和left交换，right和bottom互换）
	         * @returns 转换之后的新插入值
	         * @type Insets
	         */
	        getTransposed: function() {
	            return new Insets(this).transpose();
	        },
	        /**
	         * 得到宽度
	         * @returns 本插入值的宽度
	         * @type Number
	         */
	        getWidth: function() {
	            return this.left + this.right;
	        },
	        /**
	         * 是否为空（四个方向的值皆为0）
	         * @returns 是否为空
	         * @type boolean
	         */
	        isEmpty: function() {
	            return (this.left == 0 && this.right == 0 && this.top == 0 && this.bottom == 0);
	        },
	        /**
	         * 对本对象进行转换（top和left交换，right和bottom互换）
	         * @returns 转换之后的本对象
	         * @type Insets
	         */
	        transpose: function() {
	            var temp = this.top;
	            this.top = this.left;
	            this.left = temp;
	            temp = this.right;
	            this.right = this.bottom;
	            this.bottom = temp;
	            return this;
	        }
	    });

	    return Insets;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 14 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; /**
	  * @author jiangqifan
	  * @since 2016-6-8
	  */
	 //与Point循环依赖
	 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	     __webpack_require__,
	     __webpack_require__(3),
	     __webpack_require__(9)
	 ], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Point) {
	     'use strict';

	     /**
	      * 大小
	      * @class 大小
	      * @constructor
	      * @return 一个大小对象
	      */
	     var Dimension = function(arg1, arg2) {
	         Dimension.superclass.constructor.call(this);
	         if (arg1 == null) {
	             this.width = 0;
	             this.height = 0;
	             return;
	         }
	         if (util.isInstanceOf(arg1, Dimension)) {
	             this.width = arg1.width;
	             this.height = arg1.height;
	         } else if (util.isInstanceOf(arg1, __webpack_require__(9))) {
	             this.width = arg1.x;
	             this.height = arg1.y;
	         } else {
	             /**
	              * @type Number
	              */
	             this.width = arg1;
	             /**
	              * @type Number
	              */
	             this.height = arg2;
	         }

	     };

	     util.defineClass(Dimension, Object, {
	         /**
	          * 是否包含另一个大小（两个大小可以相等）
	          * @param {Dimension} d 另一个大小
	          * @returns 是否包含
	          * @type boolean
	          */
	         contains: function(d) {
	             return this.width >= d.width && this.height >= d.height;
	         },
	         /**
	          * 是否包含另一个大小(不包括相等)
	          * @param {Dimension} d 另一个大小
	          * @returns 是否包含
	          * @type boolean
	          */
	         containsProper: function(d) {
	             return this.width > d.width && this.height > d.height;
	         },
	         /**
	          * 两个大小是否相等
	          * @param {Dimension} d 另一个大小
	          * @returns 是否相等
	          * @type boolean
	          */
	         equals: function(d) {
	             if (d == null) {
	                 return false;
	             }
	             if (arguments.length == 1) {
	                 var d = arguments[0];
	                 return d.width == this.width && d.height == this.height;
	             } else if (arguments.length == 2) {
	                 return arguments[0] == this.width && arguments[1] == this.height;
	             }
	         },
	         /**
	          * 对本大小进行扩展
	          * @param {Number|Dimension} arg2 横向扩展值|扩展的大小
	          * @param {Number|null} arg2 纵向扩展值
	          * @returns 是否相等
	          * @type boolean
	          */
	         expand: function(arg1, arg2) {
	             if (typeof arg1 == "undefined") return this;
	             if (util.isInstanceOf(arg1, Dimension)) {
	                 this.width += arg1.width;
	                 this.height += arg1.height;
	             } else if (util.isInstanceOf(arg1, __webpack_require__(9))) {
	                 this.width += arg1.x;
	                 this.height += arg1.y;
	             } else if (arguments.length == 2) {
	                 this.width += arg1;
	                 this.height += arg2;
	             }
	             return this;
	         },
	         /**
	          * 本大小的面积
	          * @returns 本打的面积
	          * @type Number
	          */
	         getArea: function() {
	             return this.width * this.height;
	         },
	         /**
	          * 得到本大小的一个拷贝
	          * @returns 本大小的一个拷贝
	          * @type Dimension
	          */
	         getCopy: function() {
	             return new Dimension(this);
	         },
	         /**
	          * 两个大小的差值
	          * @param {Dimension} d 另一个大小
	          * @returns 两个大小的差值
	          * @type Dimension
	          */
	         getDifference: function(d) {
	             return new Dimension(this.width - d.width, this.height - d.height);
	         },
	         /**
	          * 得到一个新的大小，并将在本大小的基础上其进行扩展
	          * @param {Number|Dimension} d 需扩展的宽度|需扩展的大小
	          * @param {Number} height 需扩展的高度
	          * @returns 新的大小
	          * @type Dimension
	          */
	         getExpanded: function(d, height) {
	             var width;
	             if (arguments.length == 1) {
	                 width = d.width;
	                 height = d.height;
	             } else if (arguments.length == 2) {
	                 width = d;
	                 //  height = height;
	             }
	             return new Dimension(this.width + width, this.height + height);
	         },
	         /**
	          * 两个大小的交集(宽度为两个大小的最小宽度，高度为两个大小的最小高度)
	          * @param {Dimension} d 另一个大小
	          * @returns 两个大小的交集
	          * @type Dimension
	          */
	         getIntersected: function(d) {
	             return new Dimension(this).intersect(d);
	         },
	         /**
	          * 大小的相反值
	          * @returns 新的大小（为本大小的相反值）
	          * @type Dimension
	          */
	         getNegated: function() {
	             return new Dimension(0 - this.width, 0 - this.height);
	         },
	         /**
	          * 得到一个新的大小，并将其在本大小的基础上进行缩放
	          * @param {Number} amount 缩放比例
	          * @returns 新的大小
	          * @type Dimension
	          */
	         getScaled: function(amount) {
	             return new Dimension(this).scale(amount);
	         },
	         /**
	          *
	          */
	         getShrinked: function(arg1, arg2) {
	             if (arg1 == null) {
	                 return;
	             }
	             if (util.isInstanceOf(arg1, Dimension)) {
	                 return this.getCopy().shrink(arg1.width, arg1.height);
	             } else {
	                 return this.getCopy().shrink(arg1, arg2);
	             }
	         },
	         /**
	          * 得到一个新的大小，并将其在本大小的基础上进行变换(高宽互换);
	          * @returns 新的大小
	          * @type Dimension
	          */
	         getTransposed: function() {
	             return new Dimension(this).transpose();
	         },
	         /**
	          * 得到两个大小的并集（宽为两个大小最大之宽，高为两个大小最大之宽）
	          * @returns 新的大小
	          * @type Dimension
	          */
	         getUnioned: function(d) {
	             return new Dimension(this).union(d);
	         },
	         /**
	          * 本大小与另一个大小求交集
	          * @returns 本大小
	          * @type Dimension
	          */
	         intersect: function(d) {
	             this.width = Math.min(d.width, this.width);
	             this.height = Math.min(d.height, this.height);
	             return this;
	         },
	         /**
	          * 本大小是否为空(高宽为正数)
	          * @returns 是否为空
	          * @type boolean
	          */
	         isEmpty: function() {
	             return (this.width <= 0) || (this.height <= 0);
	             //return !((this.width > 0) && (this.height > 0));
	         },
	         /**
	          * 对本大小求反
	          * @returns 求反后的本大小
	          * @type Dimension
	          */
	         negate: function() {
	             this.width = 0 - this.width;
	             this.height = 0 - this.height;
	             return this;
	         },
	         /**
	          * 对本大小进行缩放
	          * @returns 缩放后的本大小
	          * @type Dimension
	          */
	         performScale: function(factor) {
	             return this.scale(factor);
	         },
	         performTranslate: function() {
	             //do nothing.
	         },
	         /**
	          * 对本大小进行缩放（当只提供横向缩放比例时，纵向也按照相同比例进行缩放）
	          * @param {Number} h 横向缩放比例
	          * @param {Number|null} v 纵向缩放比例
	          * @returns 缩放后的本大小
	          * @type Dimension
	          */
	         scale: function() {
	             var w;
	             var h;
	             if (arguments.length == 1) {
	                 w = arguments[0];
	                 h = w;
	             } else if (arguments.length == 2) {
	                 w = arguments[0];
	                 h = arguments[1];
	             }
	             this.width = Math.floor(this.width * w);
	             this.height = Math.floor(this.height * h);
	             return this;
	         },
	         /**
	          * 设置本大小的值
	          * @param {Dimension} d 新的值
	          * @returns 改变之后的本大小
	          * @type Dimension
	          */
	         setSize: function(d) {
	             this.width = d.width;
	             this.height = d.height;
	         },
	         /**
	          * 对本大小进行收缩
	          * @param {Number} w 宽度收缩值
	          * @param {Number} h 高度收缩值
	          * @returns 改变之后的本大小
	          * @type Dimension
	          */
	         shrink: function(w, h) {
	             return this.expand(-w, -h);
	         },
	         /**
	          * 进入如下变换(宽高互换)
	          * @returns 变换之后的本大小
	          * @type Dimension
	          */
	         transpose: function() {
	             var temp = this.width;
	             this.width = this.height;
	             this.height = temp;
	             return this;
	         },
	         /**
	          * 对本大小与另一个大小的并集（宽为两个大小最大之宽，高为两个大小最大之宽）
	          * @param {Dimension} d 另一个大小
	          * @returns 改变之后的本大小
	          * @type Dimension
	          */
	         union: function(d) {
	             this.width = Math.max(this.width, d.width);
	             this.height = Math.max(this.height, d.height);
	             return this;
	         }
	     });
	     /**
	      * 单例
	      * @static
	      * @type Dimension
	      */
	     Dimension.SINGLETON = new Dimension();
	     Dimension.max = function(d1, d2) {
	         return new Dimension(Math.max(d1.width, d2.width), Math.max(d1.height, d2.height));
	     };
	     Dimension.min = function(d1, d2) {
	         return new Dimension(Math.min(d1.width, d2.width), Math.min(d1.height, d2.height));
	     };

	     return Dimension;
	 }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 15 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(12)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, Rectangle) {
	    'use strict';

	    /**
	     * @class 几何类 提供一些做几何运算的静态方法
	     * @constructor
	     */
	    var Geometry = {};

	    /**
	     * 判断两条线是否相交
	     * @param {Number} ux 第一条线的起点的x坐标
	     * @param {Number} uy 第一条线的起点的y坐标
	     * @param {Number} vx 第一条线的终点的x坐标
	     * @param {Number} vy 第一条线的终点的y坐标
	     * @param {Number} sx 第二条线的起点的x坐标
	     * @param {Number} sy 第二条线的起点的y坐标
	     * @param {Number} tx 第二条线的终点的x坐标
	     * @param {Number} ty 第二条线的终点的y坐标
	     * @returns 是否相交
	     * @type boolean
	     */
	    Geometry.linesIntersect = function(ux, uy, vx, vy, sx, sy, tx, ty) {
	        var usX = ux - sx;
	        var usY = uy - sy;
	        var vsX = vx - sx;
	        var vsY = vy - sy;
	        var stX = sx - tx;
	        var stY = sy - ty;
	        if (Geometry.productSign(Geometry.cross(vsX, vsY, stX, stY), Geometry.cross(stX, stY, usX, usY)) >= 0) {
	            var vuX = vx - ux;
	            var vuY = vy - uy;
	            var utX = ux - tx;
	            var utY = uy - ty;
	            return Geometry.productSign(Geometry.cross(-usX, -usY, vuX, vuY), Geometry.cross(vuX, vuY, utX, utY)) <= 0;
	        }
	        return false;
	    };
	    /**
	     * @private
	     */
	    Geometry.productSign = function(x, y) {
	        if (x == 0 || y == 0) {
	            return 0;
	        } else if (x < 0 ^ y < 0) {
	            return -1;
	        }
	        return 1;
	    };
	    /**
	     * @private
	     */
	    Geometry.cross = function(x1, y1, x2, y2) {
	        return x1 * y2 - x2 * y1;
	    };
	    /**
	     * 在一定误差范围内折线是否包含某个点
	     * @param {PointList} points 折线的点
	     * @param {Number} x 待判断的点的x坐标
	     * @param {Number} y 待判断的点的y坐标
	     * @param {Number} tolerance 误差范围
	     * @returns 是否包含
	     * @type boolean
	     */
	    Geometry.polylineContainsPoint = function(points, x, y, tolerance) {
	        //???????????????????????????????????????????????????????????????????????????????TO INT ARRAY?
	        var coordinates = points.toIntArray();
	        /*
	         * For each segment of PolyLine calling isSegmentPoint
	         */
	        var index;
	        for (index = 0; index < coordinates.length - 3; index += 2) {
	            if (Geometry.segmentContainsPoint(coordinates[index], coordinates[index + 1], coordinates[index + 2], coordinates[index + 3], x, y, tolerance)) {
	                return true;
	            }
	        }
	        return false;
	    };
	    /**
	     * 在一定误差范围内线段是否包含某个点
	     * @param {Number} x1 线段起点x坐标
	     * @param {Number} y1 线段起点y坐标
	     * @param {Number} x2 线段终点x坐标
	     * @param {Number} y2 线段终点y坐标
	     * @param {Number} px 待判断的点的x坐标
	     * @param {Number} py 待判断的点的y坐标
	     * @param {Number} tolerance 误差范围
	     * @returns 是否包含
	     * @type boolean
	     */
	    Geometry.segmentContainsPoint = function(x1, y1, x2, y2, px, py, tolerance) {
	        var lineBounds = Rectangle.SINGLETON;
	        lineBounds.setSize(0, 0);
	        lineBounds.setLocation(x1, y1);
	        lineBounds.union(x2, y2);
	        lineBounds.expand(tolerance, tolerance);
	        if (!lineBounds.contains(px, py)) {
	            return false;
	        }
	        if (x1 == x2 || y1 == y2) {
	            return true;
	        }
	        var v1x = x2 - x1;
	        var v1y = y2 - y1;
	        var v2x = px - x1;
	        var v2y = py - y1;
	        var numerator = v2x * v1y - v1x * v2y;
	        var denominator = v1x * v1x + v1y * v1y;
	        var squareDistance = (numerator * numerator / denominator);
	        return squareDistance <= tolerance * tolerance;
	    };
	    /**
	     * 多边形是否包含某个点
	     * @param {PointList} points 多边形的点
	     * @param {Number} x 待判断的点的x坐标
	     * @param {Number} y 待判断的点的y坐标
	     * @returns 是否包含
	     * @type boolean
	     */
	    Geometry.polygonContainsPoint = function(points, x, y) {
	        var isOdd = false;
	        var coordinates = points.toIntArray();
	        var n = coordinates.length;
	        if (n > 3) {
	            var x1;
	            var y1;
	            var x0 = coordinates[n - 2];
	            var y0 = coordinates[n - 1];
	            var i;
	            for (i = 0; i < n; x0 = x1, y0 = y1) {
	                x1 = coordinates[i++];
	                y1 = coordinates[i++];
	                if (!Geometry.segmentContaintPoint(y0, y1, y)) {
	                    continue;
	                }
	                var crossProduct = Geometry.crossProduct(x1, y1, x0, y0, x, y);
	                if (crossProduct == 0) {
	                    if (Geometry.segmentContaintPoint(x0, x1, x)) {
	                        return true;
	                    }
	                } else if ((y0 <= y && y < y1 && crossProduct > 0) || (y1 <= y && y < y0 && crossProduct < 0)) {
	                    isOdd = !isOdd;
	                }
	            }
	            return isOdd;
	        }
	        return false;
	    };
	    /**
	     * @private
	     */
	    Geometry.segmentContaintPoint = function(x0, x1, x) {
	        return !((x < x0 && x < x1) || (x > x0 && x > x1));
	    };
	    /**
	     * @private
	     */
	    Geometry.crossProduct = function(ax, ay, bx, by, cx, cy) {
	        return (ax - cx) * (by - cy) - (ay - cy) * (bx - cx);
	    };
	    Geometry.crossLine = function(rect1, rect2) {
	        return Math.abs((rect1.x + rect1.right()) / 2 - (rect2.x + rect2.right()) / 2) < ((rect1.right() + rect2.right() - rect1.x - rect2.x) / 2) &&
	            Math.abs((rect1.y + rect1.bottom()) / 2 - (rect2.y + rect2.bottom()) / 2) < ((rect1.bottom() + rect2.bottom() - rect1.y - rect2.y) / 2);
	    };

	    return Geometry;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 16 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(12),
	    __webpack_require__(9),
	    __webpack_require__(15)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Rectangle, Point, Geometry) {
	    'use strict';

	    /**
	     * @class 点列表
	     * @constructor
	     */
	    var PointList = function(arg) {
	        PointList.superclass.constructor.call(this);
	        this.points = [];
	        this.bounds = null;
	        this.size = 0;
	        if (arg != null) {
	            if (arg instanceof Array) {
	                this.points = arg;
	                this.size = arg.length / 2;
	            } else if (util.isInstanceOf(arg, PointList)) {
	                for (var i = 0; i < arg.points.length; i++) {
	                    this.points[i] = arg.points[i];
	                }
	                this.size = arg.size;
	            }
	        }
	    };

	    //static properties
	    util.defineClass(PointList, Object, {
	        /**
	         * 增加另一个点列表中的所有点
	         */
	        addAll: function(source) {
	            if (source) {
	                for (var i = 0; i < source.points.length; i++) {
	                    this.points.push(source.points[i]);
	                }
	                this.size += source.size;
	            }
	        },
	        /**
	         * 增加一个点
	         */
	        addPoint: function(arg1, arg2) {
	            if (arg1 != null) {
	                var x;
	                var y;
	                if (util.isInstanceOf(arg1, Point)) {
	                    x = arg1.x;
	                    y = arg1.y;
	                } else {
	                    x = arg1;
	                    y = arg2;
	                }
	                this.bounds = null;
	                if (this.points.length > this.size * 2) {
	                    this.points[this.size * 2] = x;
	                    this.points[this.size * 2 + 1] = y;
	                } else {
	                    this.points.push(x);
	                    this.points.push(y);
	                }
	                this.size++;
	            }
	        },
	        /**
	         * 得到此点列表的边界
	         * @type Rectangle
	         * @returns 根据所有的点进行计算的边界
	         */
	        getBounds: function() {
	            if (this.bounds != null) return this.bounds;
	            this.bounds = new Rectangle(0, 0, 0, 0);
	            if (this.size > 0) {
	                this.bounds.setLocation(this.getPoint(0));
	                for (var i = 0; i < this.size; i++) {
	                    this.bounds.union(this.getPoint(i));
	                }
	            }
	            return this.bounds;

	        },
	        /**
	         * 得到本点列表的一个拷贝
	         * @type PointList
	         */
	        getCopy: function() {
	            return new PointList(this);
	        },
	        /**
	         * 得到第一个点
	         * @type Point
	         */
	        getFirstPoint: function() {
	            return this.getPoint(0);
	        },
	        /**
	         * 得到最后一个点
	         * @type Point
	         */
	        getLastPoint: function() {
	            return this.getPoint(this.size - 1);
	        },
	        /**
	         * 得到中间位置的点
	         * @returns 如果有奇数个点则返回第(n-1)/2的点，如果有偶数个点则返回(n-1)/2个点与(n+1)/2个点的中点
	         * @type Point
	         */
	        getMidpoint: function() {
	            if (this.size % 2 == 0) {
	                return this.getPoint(this.size / 2 - 1).getTranslated(this.getPoint(this.size / 2)).scale(0.5);
	            }
	            return this.getPoint(this.size / 2);
	        },
	        //考虑参数顺序能否修改
	        /**
	         * 得到点
	         * getPoint(index);
	         * getPoint(point,index);
	         * @returns 如果只传入位置，则返回位于这个位置的点的；如果同时传入一个点，则利用这个点接收数据，然后返回此点
	         * @type Point
	         * @throws IndexOutofBounds
	         */
	        getPoint: function(arg1, arg2) {
	            if (arg1 != null) {
	                var index;

	                if (util.isInstanceOf(arg1, Point)) {
	                    if (arg2 < 0 || arg2 >= this.size) {
	                        throw ("PointList--getPoint()-IndexOutofBounds size=" + this.size + ",index=" + arg2);
	                    }
	                    index = arg2 * 2;
	                    arg1.x = this.points[index];
	                    arg1.y = this.points[index + 1];

	                    return arg1;
	                } else {
	                    if (arg1 < 0 || arg1 >= this.size) {
	                        throw ("PointList--getPoint()-IndexOutofBounds size=" + this.size + ",index=" + arg1);
	                    }
	                    //避免传入小数取出的数据错乱
	                    index = (arg1 << 0) * 2;
	                    return new Point(this.points[index], this.points[index + 1]);
	                }
	            }
	        },
	        /**
	         * 插入一个点
	         * @param {Point} p 待插入的点
	         * @param {int} index 插入位置
	         * @throws IndexOutofBounds
	         */
	        insertPoint: function(p, index) {
	            if (this.bounds != null && !this.bounds.contains(p)) {
	                this.bounds = null;
	            }
	            if (index > this.size || index < 0) {
	                throw ("PointList--insertPoint()-IndexOutofBounds");
	            }
	            index *= 2;
	            this.points.spliec(index, 0, p.x, p.y);
	            this.size++;
	        },
	        /**
	         * 判断有点列表组成的折线是否与矩形相交
	         * @param {Rectangle} r 待判断的矩形
	         * @returns 是否相交
	         * @type boolean
	         */
	        intersects: function(r) {
	            if (r.isEmpty()) {
	                return false;
	            }
	            for (var i = 0; i < this.size * 2; i += 2) {
	                if (r.contains(this.points[i], this.points[i + 1])) {
	                    return true;
	                }
	            }
	            var diagonal1x1 = r.x;
	            var diagonal1y1 = r.y;
	            var diagonal1x2 = r.x + r.width - 1;
	            var diagonal1y2 = r.y + r.height - 1;
	            var diagonal2x1 = r.x + r.width - 1;
	            var diagonal2y1 = r.y;
	            var diagonal2x2 = r.x;
	            var diagonal2y2 = r.y + r.height - 1;
	            for (var i = 0; i < (this.size - 1) * 2; i += 2) {
	                if (Geometry.linesIntersect(diagonal1x1, diagonal1y1, diagonal1x2, diagonal1y2, this.points[i], this.points[i + 1], this.points[i + 2], this.points[i + 3]) ||
	                    Geometry.linesIntersect(diagonal2x1, diagonal2y1, diagonal2x2, diagonal2y2, this.points[i], this.points[i + 1], this.points[i + 2], this.points[i + 3])) {
	                    return true;
	                }
	            }
	            return false;
	        },
	        /**
	         * 缩放
	         * @param {Number} factor 缩放值
	         */
	        performScale: function(factor) {
	            for (var i = 0; i < this.points.lenght; i++) {
	                this.points[i] = Math.floor(this.points[i] * factor);
	            }
	            this.bounds = null;
	        },
	        /**
	         * 移动
	         * @param {Number} dx 横向移动值
	         * @param {Number} dy 纵向移动值
	         */
	        performTranslate: function(dx, dy) {
	            for (var i = 0; i < this.size * 2; i += 2) {
	                this.points[i] += dx;
	                this.points[i + 1] == dy;
	            }
	            if (this.bounds != null) {
	                this.bounds.translate(dx, dy);
	            }
	        },
	        /**
	         * 移除所有的点
	         */
	        removeAllPoints: function() {
	            //this.points = [];
	            this.bounds = null;
	            this.size = 0;
	        },
	        /**
	         * 移除一个点
	         * @param {int} index 待移除点的位置
	         * @returns 移除的点
	         * @type Point
	         */
	        removePoint: function(index) {
	            this.bounds = null;
	            if (index < 0 || index >= this.size) {
	                throw ("PointList--removePoint()-IndexOutofBounds");
	            }
	            index *= 2;
	            var pt = new Point(this.points[index], this.points[index + 1]);
	            this.points.splice(index, 2);
	            this.size--;
	            return pt;
	        },
	        /**
	         * 将点的顺序进行反转
	         */
	        reverse: function() {
	            this.points.reverse();
	            var temp;
	            for (var i = 0; i < this.size * 2; i += 2) {
	                temp = this.points[i];
	                this.points[i] = this.points[i + 1];
	                this.points[i + 1] = temp;
	            }
	        },
	        /**
	         * 设置一个点
	         * @param {Point} pt 待设置点
	         * @param {int} index 待设置位置
	         */
	        setPoint: function(pt, index) {
	            if (index < 0 || index >= this.size) {
	                throw ("PointList--setPoint()-IndexOutofBounds");
	            }
	            if (this.bounds != null && !this.bounds.contains(pt)) {
	                this.bounds = null;
	            }
	            index *= 2;
	            this.points[index] = pt.x;
	            this.points[index + 1] = pt.y;
	        },
	        /**
	         * 设置列表大小
	         * @param {int} newSize 新的大小
	         */
	        setSize: function(newSize) {
	            if (this.points.length > newSize * 2) {
	                this.size = newSize;
	                return;
	            }
	        },
	        /**
	         * 得到列表大小
	         * @type int
	         */
	        getSize: function() {
	            return this.size;
	        },
	        /**
	         * 得到所有点的数组。a[2n]为点的x坐标，a[2n+1]为点的纵坐标
	         */
	        toIntArray: function() {
	            if (this.points.length == this.size * 2) {
	                return this.points;
	            }
	            var old = this.points;
	            this.points = [];
	            for (var i = 0; i < this.size * 2; i++) {
	                this.points.push(old[i]);
	            }
	            return this.points;
	        },
	        /**
	         * 移动
	         * @see Point#translate
	         */
	        translate: function(arg1, arg2) {
	            if (arg1 != null) {
	                var x = 0;
	                var y = 0;
	                if (util.isInstanceOf(arg1, Point)) {
	                    x = arg1.x;
	                    y = arg1.y;
	                } else if (arguments.length == 2) {
	                    x = arg1;
	                    y = arg2;
	                }
	                if (this.bounds != null) {
	                    this.bounds.translate(x, y);
	                }
	                for (var i = 0; i < this.size * 2; i += 2) {
	                    this.points[i] += x;
	                    this.points[i + 1] += y;
	                }
	            }
	        },
	        /**
	         * 转换
	         * @see Point#transpose
	         */
	        transpose: function() {
	            var temp;
	            if (this.bounds != null) {
	                this.bounds.transpose();
	            }
	            for (var i = 0; i < this.size * 2; i += 2) {
	                temp = this.points[i];
	                this.points[i] = this.points[i + 1];
	                this.points[i + 1] = temp;
	            }
	        },
	        /**
	         * @see Geometry#polygonContainsPoint
	         */
	        polygonContainsPoint: function(x, y) {
	            return Geometry.polygonContainsPoint(this, x, y);
	        },
	        /**
	         * @see Geometry#polylineContainsPoint
	         */
	        polylineContainsPoint: function(x, ytolerance) {
	            return Geometry.polylineContainsPoint(this, x, ytolerance);
	        }

	    });

	    return PointList;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 17 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(9)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Point) {
	    'use strict';

	    /**
	     * @class 变换
	     * @constructor
	     */
	    var Transform = function() {
	        Transform.superclass.constructor.call(this);
	        this.scaleX = 1;
	        this.scaleY = 1;
	        this.dx = 0;
	        this.dy = 0;
	        this.cos = 1;
	        this.sin = 0;
	    };

	    //static properties
	    util.defineClass(Transform, Object, {
	        /**
	         * 设置缩放值
	         * @param {Number} x 横向缩放值
	         * @param {Number} x 纵向缩放值
	         */
	        setScale: function(x, y) {
	            if (x != null) {
	                this.scaleX = x;
	                if (y != null) {
	                    this.scaleY = y;
	                } else {
	                    this.scaleY = x;
	                }
	            }
	        },
	        /**
	         * 设置旋转角度
	         * @param {Number} angle 旋转角度
	         */
	        setRotation: function(angle) {
	            this.cos = Math.cos(angle);
	            this.sin = Math.sin(angle);
	        },
	        /**
	         * 设置移动值
	         * @param {Number} x 横向移动值
	         * @param {Number} y 纵向移动值
	         */
	        setTranslation: function(x, y) {
	            this.dx = x;
	            this.dy = y;
	        },
	        /**
	         * 对一个点进行变换
	         * @param {Point} p 待变换的点
	         */
	        getTransformed: function(p) {
	            var x = p.x;
	            var y = p.y;
	            var temp;
	            x *= this.scaleX;
	            y *= this.scaleY;
	            temp = x * this.cos - y * this.sin;
	            y = x * this.sin + y * this.cos;
	            x = temp;
	            return new Point(Math.round(x + this.dx), Math.round(y + this.dy));
	        }
	    });

	    return Transform;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 18 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    var Transposer = function() {
	        Transposer.superclass.constructor.call(this);
	        this.enabled = false;

	    };

	    //static properties
	    util.defineClass(Transposer, Object, {
	        /**
	         * 设置为不可用
	         */
	        disable: function() {
	            this.enabled = false;
	        },
	        /**
	         * 设置为可用
	         */
	        enable: function() {
	            this.enabled = true;
	        },
	        /**
	         * 是否可用
	         * @type boolean
	         */
	        isEnabled: function() {
	            return this.enabled;
	        },
	        /**
	         * 设置可用性
	         * @param {boolean} value 是否可用
	         */
	        setEnabled: function(value) {
	            this.enabled = value;
	        },
	        /**
	         * 进行转换
	         * @param {Dimension|Insets|Point|Rectangle} arg 转换者
	         */
	        t: function(arg) {
	            if (this.isEnabled()) {
	                return arg.getTransposed();
	            }
	            return arg;
	        }
	    });

	    return Transposer;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 19 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(20),
	    __webpack_require__(10)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, Graphics, Dimension) {
	    'use strict';

	    var FigureUtilities = {};

	    FigureUtilities.RGB_VALUE_MULTIPLIER = 0.6;
	    FigureUtilities.ghostFillColor = "#1F1F1F";

	    //color
	    FigureUtilities.darker = function() {
	        //TODO
	    };
	    FigureUtilities.lighter = function() {
	        //TODO
	    };

	    //figure
	    FigureUtilities.getRoot = function(figure) {
	        while (figure.getParent() != null) {
	            figure = figure.getParent();
	        }
	        return figure;
	    };
	    //text
	    FigureUtilities.getFontMetrics = function(s, f) {
	        FigureUtilities.setFont(f);
	        FigureUtilities.setText(s);
	        if (FigureUtilities.metrics == null) {
	            FigureUtilities.metrics = FigureUtilities.getGraphics().measureText(FigureUtilities.text);
	        }
	        return FigureUtilities.metrics;
	    };
	    FigureUtilities.getGraphics = function() {
	        if (FigureUtilities.graphics == null) {
	            var canvasElement = document.createElement("canvas");
	            var context = canvasElement.getContext("2d");
	            FigureUtilities.graphics = new Graphics(context);
	            FigureUtilities.font = FigureUtilities.graphics.getFont();
	        }
	        return FigureUtilities.graphics;
	    };

	    //html5-canvas只能得到width，height为undefined
	    FigureUtilities.getTextExtents = function(s, f, result) {

	        var extents = new Dimension(
	            FigureUtilities.getFontMetrics(s, f).width,
	            FigureUtilities.getFontMetrics(s, f).height);

	        if (result != null) {
	            result.width = extents.width;
	            result.height = extents.height;
	            return result;
	        } else {
	            return extents;
	        }
	    };
	    FigureUtilities.getTextWidth = function(s, f) {
	        return FigureUtilities.getFontMetrics(s, f).width;
	    };
	    FigureUtilities.setFont = function(f) {
	        if (FigureUtilities.font == f) {
	            return;
	        }
	        if (f == null) {
	            f = "12px sans-serif";
	        }
	        FigureUtilities.getGraphics().setFont(f);
	        FigureUtilities.font = f;
	        FigureUtilities.metric = null;
	    };
	    FigureUtilities.setText = function(text) {
	        if (FigureUtilities.text == text) {
	            return;
	        }
	        FigureUtilities.text = text;
	        FigureUtilities.metrics = null;
	    };
	    //shape
	    FigureUtilities.makeGhostShape = function(shape) {
	        shape.setBackgroundColor(FigureUtilities.ghostFillColor);
	        // shape.setFillXOR(true);
	        // shape.setOutlineXOR(true);
	        return shape;
	    };

	    return FigureUtilities;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 20 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(12),
	    __webpack_require__(16),
	    __webpack_require__(21)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Rectangle, PointList, Color) {
	    'use strict';

	    /**
	     * @class 基于 html5 canvas 绘图类.
	     * @constructor
	     * @return 一个新的 Graphics 对象
	     * @param (2dContext) 需要是 canvas 的 2d 绘图上下文
	     * @param (Rectangle) 用于初始化裁剪的矩形，可以为空。
	     */
	    var Graphics = function(context, rect) {
	        Graphics.superclass.constructor.call(this);

	        this.context = context;
	        this.stack = [];
	        this.stackPointer = 0;

	        this.scaleStack = [];
	        this.currentScale = { x: 1, y: 1 };

	        this.pushState();

	        if (rect == null) {
	            rect = new Rectangle(0, 0, context.canvas.width, context.canvas.height);
	        }
	        this.currentClip = rect;
	        this.clipRect(rect);


	        this.setTextBaseline("top");
	        this.setFont("12px sans-serif");

	    };


	    util.defineClass(Graphics, Object, {

	        setAntialias: function(antialias) {},
	        /**
	         * 保存状态
	         */
	        saveState: function() {
	            this.context.save();
	            this.stack.push(new Rectangle(this.currentClip));
	            this.stackPointer++;
	            this.scaleStack.push({ x: this.currentScale.x, y: this.currentScale.y });

	        },
	        /**
	         * 保存状态
	         */
	        pushState: function() {
	            this.context.save();
	            this.stack.push(new Rectangle(this.currentClip));
	            this.stackPointer++;
	            this.scaleStack.push({ x: this.currentScale.x, y: this.currentScale.y });
	        },
	        /**
	         * 恢复状态
	         */
	        restoreState: function() {
	            this.currentClip = this.stack.pop();
	            this.stackPointer--;
	            this.currentScale = this.scaleStack.pop();
	            this.context.restore();
	        },
	        /**
	         * 旋转
	         * @param {Number} angle 旋转角度
	         */
	        rotate: function(angle) {
	            this.context.rotate(angle);
	        },
	        /**
	         * 缩放
	         * @param {Number} x 横向缩放比例
	         * @param {Number} y 纵轴缩放比例
	         */
	        scale: function(x, y) {
	            this.context.scale(x, y);

	            if (x != 0 && x != 1) {
	                this.currentScale.x *= x;
	            }
	            if (y != 0 && y != 1) {
	                this.currentScale.y *= y;
	            }
	            //this.currentClip.scale(x,y);
	        },

	        setTransform: function(m11, m12, m21, m22, dx, dy) {
	            this.context.setTransform(m11, m12, m21, m22, dx, dy);
	        },
	        transform: function(m11, m12, m21, m22, dx, dy) {
	            this.context.transform(m11, m12, m21, m22, dx, dy);
	        },
	        /**
	         * 移动坐标系
	         * @param {Number} dx 横向移动值
	         * @param {Number} dy 纵向移动值
	         */
	        translate: function(dx, dy) {
	            if (dx == 0 && dy == 0) {
	                return;
	            }
	            this.context.translate(dx, dy);
	            if (this.currentClip) {
	                this.currentClip.translate(-dx * this.currentScale.x, -dy * this.currentScale.y);
	            }

	        },


	        // compositing

	        /**
	         * 获取全局透明度,默认状态下为1.0
	         * @returns 当前的全局透明度
	         * @type Number
	         */
	        getGlobalAlpha: function() {
	            return this.context.globalAlpha;
	        },
	        /**
	         * 设置全局透明度
	         * @param {Number} globalAlpha 新的全局透明度
	         */
	        setGlobalAlpha: function(globalAlpha) {
	            this.context.globalAlpha = globalAlpha;
	        },
	        /**
	         * 获取覆盖方式,默认状态下为source-over
	         * @returns 当前的覆盖方式
	         * @type String
	         */
	        getGlobalCompositeOperation: function() {
	            return this.context.globalCompositeOperation;
	        },
	        /**
	         * 设置覆盖方式
	         * @param {String} globalCompositeOperation 新的覆盖方式，可用的值为：source-over;destination-over;source-atop;destination-atop;source-in;destination-in;source-out;destination-out;lighter;darker;copy;xor
	         */
	        setGlobalCompositeOperation: function(globalCompositeOperation) {
	            this.context.globalCompositeOperation = globalCompositeOperation;
	        },


	        // colors and styles

	        //fillStyle (default black)
	        /**
	         * 获取当前的填充方式,默认状态下为#000000
	         * @returns 当前的填充方式
	         * @type String|Object
	         */
	        getFillStyle: function() {
	            return this.context.fillStyle;
	        },
	        /**
	         * 设置填充方式
	         * @see #getFillStyle
	         * @param {String|Object} 新的填充方式
	         */
	        setFillStyle: function(fillStyle) {
	            this.context.fillStyle = fillStyle;
	        },
	        //strokeStyle  (default black)

	        /**
	         * 得到笔画风格
	         * @returns 当前的画笔风格
	         * @type String|Object
	         */
	        getStrokeStyle: function() {
	            return this.context.strokeStyle;
	        },
	        /**
	         * 设置画笔风格
	         * @see #getStrokeStyle
	         * @param {String|Object} 新的画笔风格
	         */
	        setStrokeStyle: function(strokeStyle) {
	            this.context.strokeStyle = strokeStyle;
	        },
	        /**
	         * 创建线性渐变
	         */
	        createLinearGradient: function(x0, y0, x1, y1) {
	            return this.context.createLinearGradient(x0, y0, x1, y1);
	        },
	        /**
	         * 创建辐射渐变
	         */
	        createRadialGradient: function(x0, y0, r0, x1, y1, r1) {
	            return this.context.createRadialGradient(x0, y0, r0, x1, y1, r1);
	        },
	        createPattern: function(image, repetition) {
	            return this.context.createPattern(image, repetition);
	        },
	        addColorsToGrad: function(grad, colors) {
	            for (var i = 0; i < colors.length; i++) {
	                grad.addColorStop(i / colors.length, colors[i].toRGB());
	            }
	            return grad;
	        },
	        /**
	         * 设置填充颜色
	         * @param {Color} color
	         */
	        setFillColor: function(color) {
	            if (color == null) {
	                return;
	            }
	            var fillStyle = color.toRGBA();
	            this.context.fillStyle = fillStyle;
	        },
	        /**
	         * 得到当前的填充颜色
	         * @type Color
	         */
	        getFillColor: function() {
	            var fillStyle = this.context.fillStyle;
	            return Color.parse(fillStyle);
	        },
	        /**
	         * 设置画笔颜色
	         * @param {Color} color
	         */
	        setStrokeColor: function(color) {
	            if (color == null) {
	                return;
	            }
	            var strokeStyle = color.toCSS();
	            this.context.strokeStyle = strokeStyle;
	        },
	        /**
	         * 得到当前画笔颜色
	         * @type Color
	         */
	        getStrokeColor: function() {
	            var strokeStyle = this.context.strokeStyle;
	            return Color.parseCSS(strokeStyle);
	        },
	        // line styles

	        //lineCap "butt", "round", "square" (default "butt")
	        /**
	         *
	         */
	        getLineCap: function() {
	            return this.context.lineCap;
	        },
	        /**
	         *
	         */
	        setLineCap: function(lineCap) {
	            this.context.lineCap = lineCap;
	        },
	        //lineJoin  "miter", "round", "bevel" (default "miter")
	        /**
	         *
	         */
	        getLineJoin: function() {
	            return this.context.lineJoin;
	        },
	        /**
	         *
	         */
	        setLineJoin: function(lineJoin) {
	            this.context.lineJoin = lineJoin;
	        },
	        //lineWidth  (default 1)
	        /**
	         *
	         */
	        getLineWidth: function() {
	            return this.context.lineWidth;
	        },
	        /**
	         *
	         */
	        setLineWidth: function(lineWidth) {
	            this.context.lineWidth = lineWidth;
	        },
	        //miterLimit  (default 10)
	        /**
	         *
	         */
	        getMiterLimit: function() {
	            return this.context.miterLimit;
	        },
	        /**
	         *
	         */
	        setMiterLimit: function(miterLimit) {
	            this.context.miterLimit = miterLimit;
	        },
	        /**
	         * 设置线条属性
	         * @param {LineAtrributes} lineAttributes
	         */
	        setLineAttributes: function(lineAttributes) {
	            if (lineAttributes == null) {
	                return;
	            }
	            var lineCap = lineAttributes.lineCap.toLowerCase();
	            if (lineCap == "butt" || lineCap == "round" || lineCap == "square") {
	                this.context.lineCap = lineAttributes.lineCap;
	            }
	            var lineJoin = lineAttributes.lineJoin.toLowerCase();
	            if (lineJoin == "miter" || lineJoin == "round" || lineJoin == "bevel") {
	                this.context.lineJoin = lineAttributes.lineJoin;
	            }
	            if (lineAttributes.lineWidth > 0) {
	                this.context.lineWidth = lineAttributes.lineWidth;
	            }
	            if (lineAttributes.miterLimit > 0) {
	                this.context.miterLimit = lineAttributes.miterLimit;
	            }
	            this.setStrokeColor(lineAttributes.lineColor);
	        },

	        // shadows

	        //shadowBlur  (default 0)
	        /**
	         * 得到阴影模糊度 默认为0
	         */
	        getShadowBlur: function() {
	            return this.context.shadowBlur;
	        },
	        /**
	         * 设置阴影模糊度
	         * @param {int} shadowBlur
	         */
	        setShadowBlur: function(shadowBlur) {
	            this.context.shadowBlur = shadowBlur;
	        },
	        //shadowColor  (default transparent black)
	        /**
	         * 得到阴影颜色
	         * @type String
	         */
	        getShadowColor: function() {
	            return this.context.shadowColor;
	        },
	        /**
	         * 设置阴影颜色
	         * @param {String} shadowColor
	         */
	        setShadowColor: function(shadowColor) {
	            this.context.shadowColor = shadowColor;
	        },
	        //shadowOffsetX  (default 0)
	        /**
	         * 得到阴影横向偏移值
	         */
	        getShadowOffsetX: function() {
	            return this.context.shadowOffsetX;
	        },
	        /**
	         * 设置阴影横向偏移值
	         * @param {int} shadowOffsetX
	         */
	        setShadowOffsetX: function(shadowOffsetX) {
	            this.context.shadowOffsetX = shadowOffsetX;
	        },
	        //shadowOffsetY  (default 0)
	        /**
	         * 得到阴影纵向偏移值
	         */
	        getShadowOffsetY: function() {
	            return this.context.shadowOffsetY;
	        },
	        /**
	         * 设置阴影纵向偏移值
	         * @param {int} shadowOffsetY
	         */
	        setShadowOffsetY: function(shadowOffsetY) {
	            this.context.shadowOffsetY = shadowOffsetY;
	        },

	        // rects
	        /**
	         * 清除一块矩形区域
	         */
	        clearRect: function(x, y, w, h) {
	            this.context.clearRect(x, y, w, h);
	        },
	        /**
	         * 填充一块矩形区域
	         */
	        fillRect: function(x, y, w, h) {
	            this.context.fillRect(x, y, w, h);
	        },
	        /**
	         * 用画笔勾勒出一块矩形区域
	         */
	        strokeRect: function(x, y, w, h) {
	            this.context.strokeRect(x, y, w, h);
	        },


	        // Complex shapes (paths) API
	        /**
	         * 画圆弧
	         */
	        arc: function(x, y, radius, startAngle, endAngle, anticlockwise) {
	            this.context.arc(x, y, radius, startAngle, endAngle, anticlockwise);
	        },
	        /**
	         *
	         */
	        arcTo: function(x1, y1, x2, y2, radius) {
	            this.context.arcTo(x1, y1, x2, y2, radius);
	        },
	        /**
	         *
	         */
	        beginPath: function() {
	            this.context.beginPath();
	        },
	        bezierCurveTo: function(cp1x, cp1y, cp2x, cp2y, x, y) {
	            this.context.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);
	        },
	        /*
	        _clip: function(){
	        	this.context.clip();
	        }
	        */
	        /**
	         *
	         */
	        closePath: function() {
	            this.context.closePath();
	        },
	        /**
	         * 填充
	         */
	        fill: function() {
	            this.context.fill();
	        },
	        /**
	         * 画线条至
	         */
	        lineTo: function(x, y) {
	            this.context.lineTo(x, y);
	        },
	        /**
	         * 移动至
	         */
	        moveTo: function(x, y) {
	            this.context.moveTo(x, y);
	        },
	        quadraticCurveTo: function(cpx, cpy, x, y) {
	            this.context.quadraticCurveTo(cpx, cpy, x, y);
	        },
	        /**
	         * 在绘图路径中添加一个矩形
	         */
	        rect: function(x, y, w, h) {
	            this.context.rect(x, y, w, h);
	        },
	        /**
	         * 勾勒
	         */
	        stroke: function() {
	            this.context.stroke();
	        },
	        /**
	         * 一个点是否在路径中
	         */
	        isPointInPath: function(x, y) {
	            return this.context.isPointInPath(x, y);
	        },
	        /**
	         * 绘制椭圆
	         */
	        ellipse: function(x, y, horiRadius, vertRadius, startAngle, endAngle, anticlockwise) {
	            this.context.moveTo(x + horiRadius * Math.cos(startAngle * Math.PI / 180), y - vertRadius * Math.sin(startAngle * Math.PI / 180));
	            this.lineToEllipse(x, y, horiRadius, vertRadius, startAngle, endAngle, anticlockwise);
	        },
	        lineToEllipse: function(x, y, horiRadius, vertRadius, startAngle, endAngle, anticlockwise) {
	            for (var i = startAngle; i <= endAngle; i++) {
	                var ii = i * Math.PI / 180;
	                var x1 = x + horiRadius * Math.cos(ii);
	                var y1 = y - vertRadius * Math.sin(ii);
	                this.context.lineTo(x1, y1);
	            }
	        },
	        /**
	         * 圆角矩形
	         */
	        roundRect: function(x, y, width, height, horiRadius, vertRadius) {
	            this.context.moveTo(x + 0.5, y + vertRadius);
	            //this.context.lineTo(x+1,y+height-vertRadius);
	            this.lineToEllipse(x + horiRadius + 0.5, y + height - vertRadius, horiRadius, vertRadius - 0.5, 180, 270, true);
	            //this.context.lineTo(x+width-horiRadius,y+height-1);
	            this.lineToEllipse(x + width - horiRadius, y + height - vertRadius - 0.5, horiRadius, vertRadius - 0.5, 270, 360, true);
	            //this.context.lineTo(x+width,y+vertRadius);
	            this.lineToEllipse(x + width - horiRadius, y + vertRadius, horiRadius, vertRadius, 0, 90, true);
	            //this.context.lineTo(x+1+horiRadius,y+1);
	            this.lineToEllipse(x + horiRadius + 0.5, y + vertRadius, horiRadius, vertRadius, 90, 180, true);
	        },
	        /**
	         * 多边形
	         * @param {PointList} pointList
	         */
	        polygon: function(pointList) {
	            var start = pointList.getFirstPoint();
	            if (start == null) {
	                return;
	            }
	            this.context.moveTo(start.x, start.y);
	            for (var i = 1; i < pointList.size; i++) {
	                var temp = pointList.getPoint(i);
	                this.context.lineTo(temp.x, temp.y);
	            }
	            this.context.lineTo(start.x, start.y);
	        },
	        /**
	         * 折线
	         * @param {PointList} pointList
	         * @param {boolean} sharpen 是否锐化
	         */
	        polyline: function(pointList, sharpen) {
	            var start = pointList.getFirstPoint();
	            if (start == null) {
	                return;
	            }
	            if (sharpen) {
	                this.context.moveTo((start.x >> 0) + 0.5, (start.y >> 0) + 0.5);
	            } else {
	                this.context.moveTo(start.x, start.y);
	            }

	            for (var i = 1; i < pointList.size; i++) {
	                var temp = pointList.getPoint(i);
	                if (sharpen) {
	                    this.context.lineTo((temp.x >> 0) + 0.5, (temp.y >> 0) + 0.5);
	                } else {
	                    this.context.lineTo(temp.x, temp.y);
	                }
	            }
	            return start;
	        },
	        /**
	         * 虚线折线
	         * @param {PointList} points 折线的点列表
	         * @param {int} dashlen 虚线的每段长度
	         * @param {int} gaplen 间隔长度
	         * @param {Array} 虚线模式
	         */
	        dashedPolyline: function(points, dashlen, gaplen, dashPattern) {
	            var start = points.getFirstPoint();
	            if (start == null) {
	                return;
	            }
	            //this.context.moveTo(start.x,start.y);
	            var begin = start;
	            var end;
	            for (var i = 1; i < points.size; i++) {
	                var end = points.getPoint(i);
	                this.dashedLine(begin.x, begin.y, end.x, end.y, dashlen, gaplen, dashPattern);
	                begin = end;
	            }
	        },
	        /**
	         * 虚线
	         * @param {int} x 起点x坐标
	         * @param {int} y 起点y坐标
	         * @param {int} x2 终点x坐标
	         * @param {int} y2 终点y坐标
	         * @param {int} dashlen 虚线的每段长度
	         * @param {int} gaplen 间隔长度
	         * @param {Array} 虚线模式
	         */
	        dashedLine: function(x, y, x2, y2, dashlen, gaplen, dashArray) {
	            if (!dashArray) dashArray = [dashlen, gaplen];
	            var dashCount = dashArray.length;
	            this.context.moveTo(x, y);
	            var dx = (x2 - x),
	                dy = (y2 - y);
	            var slope = dy / dx;
	            var distRemaining = Math.sqrt(dx * dx + dy * dy);
	            var dashIndex = 0,
	                draw = true;
	            var signal = dx == 0 ? (y2 > y ? 1 : -1) : (x2 > x ? 1 : -1);

	            while (distRemaining >= 0.1) {
	                var dashLength = dashArray[dashIndex++ % dashCount];
	                if (dashLength > distRemaining) dashLength = distRemaining;
	                var xStep = dx == 0 ? 0 : Math.sqrt(dashLength * dashLength / (1 + slope * slope));

	                x += xStep * signal;
	                y += dx == 0 ? dashLength * signal : slope * xStep * signal;
	                this[draw ? 'lineTo' : 'moveTo'](x, y);
	                distRemaining -= dashLength;
	                draw = !draw;
	            }
	        },
	        drawFocus: function(x, y, width, height) {
	            this.beginPath();
	            this.dashedPolyline(new PointList([x + 0.5, y + 0.5, x + width - 0.5, y + 0.5, x + width - 0.5, y + height - 0.5, x + 0.5, y + height - 0.5, x + 0.5, y + 0.5]), 4, 4, Graphics.FOCUS_PATTERN);
	            this.stroke();
	        },
	        //font: (default 10px sans-serif)
	        /**
	         * 得到字体
	         * @type String
	         */
	        getFont: function() {
	            return this.context.font;
	        },
	        /**
	         * 设置字体
	         * @param {String} font
	         */
	        setFont: function(font) {
	            if (font == null) {
	                return;
	            }
	            this.context.font = font;
	        },
	        //textAlign: "start", "end", "left", "right", "center" (default: "start")
	        /**
	         * 得到文字对齐方式
	         * @type String
	         */
	        getTextAlign: function() {
	            return this.context.textAlign;
	        },
	        /**
	         * 设置文字对齐方式
	         * @param {String} textAlign
	         */
	        setTextAlign: function(textAlign) {
	            this.context.textAlign = textAlign;
	        },
	        //textBaseline: "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" (default: "alphabetic")
	        /**
	         * 得到文字基线位置
	         * @type String
	         */
	        getTextBaseline: function() {
	            return this.context.textBaseline;
	        },
	        /**
	         * 得到文字基线位置
	         * @param {String} textBaseline
	         */
	        setTextBaseline: function(textBaseline) {
	            this.context.textBaseline = textBaseline;
	        },
	        /**
	         * 填充文字
	         * @param {String} string 需填充的文字
	         * @param {int} x 起始位置x坐标
	         * @param {int} y 起始位置y坐标
	         * @param {int|null} maxWidth 最大宽度
	         */
	        fillText: function(string, x, y, maxWidth) {
	            if (util.browser.ie && 11 == util.browser.version) {
	                y -= 2;
	            }
	            if (string != null && !isNaN(x) && !isNaN(y) && !isNaN(maxWidth)) {
	                this.context.fillText(string, x, y, maxWidth);
	            } else if (string != null && !isNaN(x) && !isNaN(y)) {
	                this.context.fillText(string, x, y);
	            }

	        },
	        measureText: function(text) {
	            return this.context.measureText(text);
	        },
	        /**
	         * 勾勒文字
	         * @param {String} string 需勾勒的文字
	         * @param {int} x 起始位置x坐标
	         * @param {int} y 起始位置y坐标
	         * @param {int|null} maxWidth 最大宽度
	         */
	        strokeText: function(string, x, y, maxWidth) {
	            if (util.browser.ie && 11 == util.browser.version) {
	                y -= 2;
	            }
	            if (string != null && !isNaN(x) && !isNaN(y) && !isNaN(maxWidth)) {
	                this.context.strokeText(string, x, y, maxWidth);
	            } else if (string != null && !isNaN(x) && !isNaN(y)) {
	                this.context.strokeText(string, x, y);
	            }

	        },


	        // drawing images
	        /**
	         * 绘制图片
	         * @param {Image} image
	         * @param {int} x1
	         * @param {int} y1
	         * @param {int} w1
	         * @param {int} h1
	         * @param {int} x2
	         * @param {int} y2
	         * @param {int} w2
	         * @param {int} h2
	         */
	        drawImage: function(image, x1, y1, w1, h1, x2, y2, w2, h2) {
	            if (image == null) {
	                return;
	            }
	            if (!isNaN(x1) && !isNaN(y1)) {
	                if (!isNaN(w1) && !isNaN(h1)) {
	                    if (!isNaN(w2) && !isNaN(h2)) {
	                        this.context.drawImage(image, x1, y1, w1, h1, x2, y2, w2, h2);
	                    } else {
	                        this.context.drawImage(image, x1, y1, w1, h1);
	                    }
	                } else {
	                    this.context.drawImage(image, x1, y1);
	                }
	            }
	        },


	        // pixel manipulation
	        createImageData: function(arg1, arg2) {
	            if (arg1 != null && arg2 != null) {
	                return this.context.createImageData(arg1, arg2);
	            } else if (arg1 != null) {
	                return this.context.createImageData(arg1);
	            }

	        },
	        getImageData: function(sx, sy, sw, sh) {
	            return this.context.getImageData(sx, sy, sw, sh);
	        },
	        putImageData: function(imagedata, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight) {
	            if (imagedata == null) {
	                return;
	            }
	            if (!isNaN(dx) && !isNaN(dy) && !isNaN(dirtyX) && !isNaN(dirtyY) && !isNaN(dirtyWidth) && !isNaN(dirtyHeight)) {
	                this.context.putImageData(imagedata, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight);
	            } else if (!isNaN(dx) && !isNaN(dy)) {
	                this.context.putImageData(imagedata, dx, dy);
	            }
	        },
	        fillRectangle: function(x, y, width, height) {
	            if (!isNaN(x) && !isNaN(y) && !isNaN(width) && !isNaN(height)) {
	                this.context.fillRect(x, y, width, height);
	            } else if (x != null && util.isInstanceOf(x, Rectangle)) {
	                this.context.fillRect(x.x, x.y, x.width, x.height);
	            }
	            //TODO
	        },
	        //clip
	        clipRect: function(rect) {
	            //????clip
	            this.currentClip.intersect(rect.x * this.currentScale.x, rect.y * this.currentScale.y,
	                rect.width * this.currentScale.x, rect.height * this.currentScale.y);
	            //????τclip
	            this.context.beginPath();
	            this.context.rect(rect.x, rect.y, rect.width, rect.height);
	            this.context.closePath();
	            this.context.clip();
	            //
	        },
	        clipPath: function(path) {
	            //TODO ??ю?????
	            //?????ю?????ì???context???Ч?ì?ˇ?????????context. ????????`?clip stack????rectangle????юc(??????)
	        },
	        getClip: function(rect) {

	            rect.x = this.currentClip.x / this.currentScale.x;
	            rect.y = this.currentClip.y / this.currentScale.y;
	            rect.width = this.currentClip.width / this.currentScale.x;
	            rect.height = this.currentClip.height / this.currentScale.y;
	            /*
	            rect.x = this.currentClip.x;
	            rect.y = this.currentClip.y;
	            rect.width = this.currentClip.width;
	            rect.height = this.currentClip.height;
	            */
	            return rect;
	        },
	        //dispose
	        dispose: function() {
	            while (this.stackPointer > 0) {
	                this.restoreState();
	            }
	            delete this.context;
	        }
	    });

	    //static properties
	    Graphics.FOCUS_PATTERN = [1, 2, 1, 2];

	    return Graphics;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 21 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    /**
	     * @class 颜色
	     * @constructor
	     * @param {int} red 红色值（0-255）
	     * @param {int} green 绿色值（0-255）
	     * @param {int} blue 蓝色值（0-255）
	     * @param {Number} alpha 透明度（0-1）
	     * @returns
	     */
	    var Color = function(red, green, blue, alpha) {
	        Color.superclass.constructor.call(this);
	        if (red != null) {
	            this.red = red;
	        } else {
	            this.red = 0;
	        }
	        if (green != null) {
	            this.green = green;
	        } else {
	            this.green = 0;
	        }
	        if (blue != null) {
	            this.blue = blue;
	        } else {
	            this.blue = 0;
	        }
	        if (alpha != null) {
	            this.alpha = alpha;
	        } else {
	            this.alpha = 1;
	        }
	    };

	    //static properties


	    /**
	     * 将颜色字符串解析成Color对象
	     * @static
	     * @param {String|int} style 颜色值，可以是数字或字符串 支持格式如下:"#000000";"rgb(255,255,255)";"rgba(255,255,255,1)";12632256
	     * @returns 解析出来的颜色对象
	     * @type Color
	     */
	    Color.parse = function(style) {
	        if (style == null) {
	            return;
	        }
	        if (!isNaN(style)) {
	            return Color.parseNumber(style);
	        }
	        var reg_rgba = /rgba/;
	        if (reg_rgba.exec(style) != null) {
	            return Color.parseRGBA(style);
	        }
	        var reg_css = /#/;
	        if (reg_css.exec(style) != null) {
	            return Color.parseCSS(style);
	        }
	    };
	    Color.parseCSS = function(style) {
	        if (style == null) {
	            return;
	        }
	        style = new String(style);
	        var index = style.indexOf("#") + 1;
	        var red_string = style.substring(index, index + 2);
	        var green_string = style.substring(index + 2, index + 4);
	        var blue_string = style.substring(index + 4, index + 6);
	        return new Color(parseInt(red_string, 16), parseInt(green_string, 16), parseInt(blue_string, 16));
	    };
	    Color.parseRGBA = function(style) {
	        if (style == null) {
	            return;
	        }
	        style = new String(style);
	        var index = style.indexOf("rgba(");
	        var red_index = index + 5;
	        var green_index = style.indexOf(",", red_index) + 1;
	        var blue_index = style.indexOf(",", green_index) + 1;
	        var alpha_index = style.indexOf(",", blue_index) + 1;
	        var end_index = style.indexOf(")");
	        var red_string = style.substring(red_index, green_index - 1);
	        var green_string = style.substring(green_index, blue_index - 1);
	        var blue_string = style.substring(blue_index, alpha_index - 1);
	        var alpha_string = style.substring(alpha_index, end_index);
	        return new Color(parseInt(red_string), parseInt(green_string), parseInt(blue_string), parseFloat(alpha_string));
	    };
	    Color.parseNumber = function(color) {
	        if (color < 0) {
	            color = color >>> 0;
	        }
	        var red = (color >> 16);
	        var green_blue = color - (red << 16);
	        var green = green_blue >> 8;
	        var blue = green_blue - (green << 8);
	        return new Color(red, green, blue);
	    };

	    util.defineClass(Color, Object, {
	        isOpaque: function() {
	            return false;
	        },
	        /**
	         * 判断两颜色是否相等
	         * @param {Object} o 另一个颜色
	         * @returns 如果参数不是颜色值则返回false，如果是则依次判断其各属性是否相等
	         * @type boolean
	         */
	        equals: function(o) {
	            if (o == this) return true;
	            if (o == null) return false;
	            if (!util.isInstanceOf(o, Color)) return false;
	            return o.red == this.red && o.green == this.green && o.blue == this.blue && o.alpha == this.alpha;
	        },
	        /**
	         * 转换成"#000000"的形式
	         * @returns CSS格式的颜色值
	         * @type String
	         */
	        toCSS: function() {
	            return new String("#" + this.toHexaString(this.red) + this.toHexaString(this.green) + this.toHexaString(this.blue)).toUpperCase();
	        },
	        /**
	         * 转换成"rgb(255,255,255)"的形式
	         * @returns rgb格式的颜色值
	         * @type String
	         */
	        toRGB: function() {
	            return "rgb(" + this.red + "," + this.green + "," + this.blue + ")";
	        },
	        /**
	         * 转换成"rgba(255,255,255,1)"的形式
	         * @returns rgba格式的颜色值
	         * @type String
	         */
	        toRGBA: function() {
	            return "rgba(" + this.red + "," + this.green + "," + this.blue + "," + this.alpha + ")";
	        },
	        toHexaString: function(num) {
	            var string;
	            if (num > 15) {
	                string = num.toString(16);
	            } else {
	                string = "0" + num.toString(16);
	            }
	            return string;
	        }
	    });

	    return Color;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 22 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(21)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, Color) {
	    'use strict';

	    /**
	     * @class 颜色值常量
	     * @constructor
	     */
	    var ColorConstants = {};

	    /**
	     * @static
	     * @type
	     */
	    ColorConstants.white = new Color(255, 255, 255);
	    /**
	     * @static
	     * @type
	     */
	    ColorConstants.lightGray = new Color(192, 192, 192);
	    /**
	     * @static
	     * @type
	     */
	    ColorConstants.gray = new Color(128, 128, 128);
	    /**
	     * @static
	     * @type
	     */
	    ColorConstants.darkGray = new Color(64, 64, 64);
	    /**
	     * @static
	     * @type
	     */
	    ColorConstants.black = new Color(0, 0, 0);
	    /**
	     * @static
	     * @type
	     */
	    ColorConstants.red = new Color(255, 0, 0);
	    /**
	     * @static
	     * @type
	     */
	    ColorConstants.orange = new Color(255, 196, 0);
	    /**
	     * @static
	     * @type
	     */
	    ColorConstants.yellow = new Color(255, 255, 0);
	    /**
	     * @static
	     * @type
	     */
	    ColorConstants.green = new Color(0, 255, 0);
	    /**
	     * @static
	     * @type
	     */
	    ColorConstants.lightGreen = new Color(96, 255, 96);
	    /**
	     * @static
	     * @type
	     */
	    ColorConstants.darkGreen = new Color(0, 127, 0);
	    /**
	     * @static
	     * @type
	     */
	    ColorConstants.cyan = new Color(0, 255, 255);
	    /**
	     * @static
	     * @type
	     */
	    ColorConstants.lightBlue = new Color(127, 127, 255);
	    /**
	     * @static
	     * @type
	     */
	    ColorConstants.blue = new Color(0, 0, 255);
	    /**
	     * @static
	     * @type
	     */
	    ColorConstants.darkBlue = new Color(0, 0, 127);

	    ColorConstants.buttonLightest = new Color(255, 255, 255);
	    ColorConstants.button = new Color(240, 240, 240);
	    ColorConstants.buttonDarker = new Color(160, 160, 160);
	    ColorConstants.buttonDarkest = new Color(105, 105, 105);
	    ColorConstants.listBackground = new Color(255, 255, 255);
	    ColorConstants.listForeground = new Color(0, 0, 0);
	    ColorConstants.menuBackground = new Color(240, 240, 240);
	    ColorConstants.menuForeground = new Color(0, 0, 0);
	    ColorConstants.menuBackgroundSelected = new Color(51, 153, 255);
	    ColorConstants.menuForegroundSelected = new Color(255, 255, 255);
	    ColorConstants.titleBackground = new Color(153, 180, 209);
	    ColorConstants.titleGradient = new Color(185, 209, 234);
	    ColorConstants.titleForeground = new Color(0, 0, 0);
	    ColorConstants.titleInactiveForeground = new Color(67, 78, 84);
	    ColorConstants.titleInactiveBackground = new Color(191, 205, 219);
	    ColorConstants.titleInactiveGradient = new Color(215, 228, 242);
	    ColorConstants.tooltipForeground = new Color(0, 0, 0);
	    ColorConstants.tooltipBackground = new Color(255, 255, 225);

	    return ColorConstants;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 23 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(10),
	    __webpack_require__(12)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Dimension, Rectangle) {
	    'use strict';

	    /**
	     * @class 抽象边框
	     * @constructor
	     * @returns
	     */
	    var AbstractBorder = function() {
	        AbstractBorder.superclass.constructor.call(this);

	    };

	    //static properties


	    AbstractBorder.EMPTY = new Dimension(0, 0);
	    AbstractBorder.tempRect = new Rectangle(0, 0, 0, 0);

	    util.defineClass(AbstractBorder, Object, {
	        /**
	         * 得到绘图区
	         */
	        getPaintRectangle: function(figure, insets) {
	            AbstractBorder.tempRect.setBounds(figure.getBounds());
	            return AbstractBorder.tempRect.crop(insets);
	        },
	        /**
	         * 得到首选大小
	         */
	        getPreferredSize: function(f) {
	            return AbstractBorder.EMPTY;
	        },
	        /**
	         * 是否不透明
	         * @returns false
	         */
	        isOpaque: function() {
	            return false;
	        }

	    });

	    return AbstractBorder;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 24 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	//与Figure循环依赖
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(23),
	    __webpack_require__(25)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractBorder, Figure) {
	    'use strict';

	    var AbstractBackground = function() {
	        AbstractBackground.superclass.constructor.call(this);

	    };

	    //static properties
	    util.defineClass(AbstractBackground, AbstractBorder, {
	        getInsets: function(figure) {
	            var Figure = __webpack_require__(25);
	            return Figure.NO_INSETES;
	        }
	    });

	    return AbstractBackground;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 25 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 * @module Figure
	 */
	// 与AbstractBackground循环依赖
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(26),
	    __webpack_require__(27),
	    __webpack_require__(28),
	    __webpack_require__(12),
	    __webpack_require__(29),
	    __webpack_require__(9),
	    __webpack_require__(10),
	    __webpack_require__(31),
	    __webpack_require__(4),
	    __webpack_require__(32),
	    __webpack_require__(24),
	    __webpack_require__(30),
	    __webpack_require__(33),
	    __webpack_require__(34),
	    __webpack_require__(35),
	    __webpack_require__(36)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    NoInsets,
	    TreeSearch,
	    FigureConstants,
	    Rectangle,
	    EventListenerList,
	    Point,
	    Dimension,
	    AncestorHelper,
	    PropertyChangeSupport,
	    ExclusionSearch,
	    AbstractBackground,
	    TypeIterator,
	    UpdateManager,
	    FigureIterator,
	    IdentitySearch,
	    LayoutNotifier
	) {
	    'use strict';

	    //从TypeIterator类复制过来，注销TypeIterator类中共同的部分
	    var EMPTY_IERATOR = {
	        next: function() { return null; },
	        hasNext: function() { return false; }
	    };

	    /**
	     * 基本的图形类，所有图形类的基类，定义了一个图形元素必须要实现的基本功能，通过对对其进行扩展可以为图形元素提供额外的功能
	     * @class 最基本的图形类
	     * @constructor Figure
	     * @return 一个最基本的图形对象
	     */
	    var Figure = function(id) {
	        Figure.superclass.constructor.call(this);
	        this.flags = FigureConstants.FLAG_VISIBLE | FigureConstants.FLAG_ENABLED;
	        this.children = [];
	        this.bounds = new Rectangle(0, 0, 0, 0);
	        this.eventListeners = new EventListenerList();
	        this.id = id;
	        this.propertyListeners = null;
	        this.prefSize = null;
	        this.minSize = null;
	        this.maxSize = null;
	        this.font = null;
	        this.bgColor = null;
	        this.fgColor = null;
	        this.border = null;
	        this.toolTip = null;
	        this.ancestorHelper = null;

	    };

	    //static properties
	    Figure.NO_INSETS = new NoInsets();
	    Figure.PRIVATE_RECT = new Rectangle(0, 0, 0, 0);
	    Figure.PRIVATE_POINT = new Point(0, 0);
	    Figure.EMPTY_LIST = null;
	    Figure.MAX_DIMENSION = new Dimension(Number.MAX_VALUE, Number.MAX_VALUE);
	    Figure.MIN_DIMENSION = new Dimension(5, 5);

	    Figure.FLAG_VALID = 1,
	        Figure.FLAG_OPAQUE = 1 << 1;
	    Figure.FLAG_VISIBLE = 1 << 2;
	    Figure.FLAG_FOCUSABLE = 1 << 3;
	    Figure.FLAG_ENABLED = 1 << 4;
	    Figure.FLAG_FOCUS_TRAVERSABLE = 1 << 5;
	    Figure.FLAG_REALIZED = 1 << 31;
	    Figure.MAX_FLAG = Figure.FLAG_FOCUS_TRAVERSABLE;

	    util.defineClass(Figure, Object, {
	        /**
	         *增加子图形
	         * @param {Figure} child 要增加的子图形
	         * @param {Object} constraint 约束,可选
	         * @param {Int} index 位置,可选
	         */
	        add: function(child, constraint, index) {
	            //check for cycle in hierarchy
	            var figure;
	            for (figure = this; figure; figure = figure.getParent()) {
	                if (figure == child) {
	                    Debugger.log(this.id + " => " + "Figure-add-Figure being added introduces cycle");
	                }
	            }
	            //Detach the child from previous parent
	            if (child.getParent()) {
	                child.getParent().remove(child);
	            }

	            index = (index == null) ? -1 : index;

	            if (index == -1) {
	                this.children.push(child);
	            } else {
	                this.children.splice(index, 0, child);
	            }


	            child.setParent(this);

	            if (this.layoutManager && constraint) {
	                this.layoutManager.setConstraint(child, constraint);
	            }

	            this.revalidate();

	            if (this.getFlag(FigureConstants.FLAG_REALIZED)) {
	                child.addNotify();
	            }
	            child.repaint();
	        },
	        /**
	         *增加祖先监听器
	         * @param {Object} ancestorListener 监听器
	         */
	        addAncestorListener: function(ancestorListener) {
	            if (this.ancestorHelper == null) {
	                this.ancestorHelper = new AncestorHelper(this);
	            }
	            this.ancestorHelper.addAncestorListener(ancestorListener);
	        },
	        addCoordinateListener: function(listener) {
	            this.eventListeners.addListener("CoordinateListener", listener);
	        },
	        addFigureListener: function(listener) {
	            this.eventListeners.addListener("FigureListener", listener);
	        },
	        addFocusListener: function(listener) {
	            this.eventListeners.addListener("FocusListener", listener);
	        },
	        addKeyListener: function(listener) {
	            this.eventListeners.addListener("KeyListener", listener);
	        },
	        addLayoutListener: function(listener) {
	            if (this.layoutManager != null && util.isInstanceOf(this.layoutManager, LayoutNotifier)) {
	                this.layoutManager.listeners.push(listener);
	            } else {
	                this.layoutManager = new LayoutNotifier(this.layoutManager, listener, this);
	            }
	        },
	        addListener: function(clazz, listener) {
	            this.eventListeners.addListener(clazz, listener);
	        },
	        addMouseListener: function(listener) {
	            this.eventListeners.addListener("MouseListener", listener);
	        },
	        addMouseMotionListener: function(listener) {
	            this.eventListeners.addListener("MouseMotionListener", listener);
	        },

	        //add notify for this figure and it's children
	        addNotify: function() {
	            if (this.getFlag(FigureConstants.FLAG_REALIZED)) {
	                Debugger.log(this.id + " => " + "addNotify() should not be called multiple times");
	            }
	            this.setFlag(FigureConstants.FLAG_REALIZED, true);
	            for (var i = 0; i < this.children.length; i++) {
	                this.children[i].addNotify();
	            }
	        },
	        addPropertyChangeListener: function(property, listener) {
	            if (this.propertyListeners == null) {
	                this.propertyListeners = new PropertyChangeSupport(this);
	            }
	            if (arguments.length == 2 && property != null) {
	                this.propertyListeners.addPropertyChangeListener(property, listener);
	            } else {
	                var temp = (property != null ? property : listener);
	                this.propertyListeners.addPropertyChangeListener(listener);
	            }
	        },
	        /**
	         *是否包含某个点
	         * @param {Point/Number} arg1 点或者x坐标
	         * @param {Number} arg2 y坐标，当第一个参数为x坐标时使用
	         */
	        containsPoint: function(arg1, arg2) {
	            if (arg1 == null) {
	                return;
	            }
	            var x;
	            var y;
	            if (util.isInstanceOf(arg1, Point)) {
	                x = arg1.x;
	                y = arg1.y;
	            } else if (arg2 != null) {
	                x = arg1;
	                y = arg2;
	            }
	            return this.getBounds().contains(x, y);
	        },
	        dispose: function() {
	            if (null != this.children) {
	                for (var i = 0; i < this.children.length; i++) {
	                    var child = this.children[i];
	                    this.children[i] = null;
	                    if (child && child.dispose) {
	                        child.dispose();
	                    }
	                }
	                this.children = null;
	            }

	            if (this.layoutManager && this.layoutManager.dispose) {
	                this.layoutManager.dispose();
	            }
	            this.layoutManager = null;
	            if (null != this.ancestorHelper && this.ancestorHelper.dispose) {
	                this.ancestorHelper.dispose();
	            }
	            this.ancestorHelper = null;

	            if (null != this.eventListeners) {
	                for (var i = 0; i < this.eventListeners.length; i++) {
	                    this.eventListeners[i] = null;
	                }
	                this.eventListeners = null;
	            }

	            this.parent = null;

	            this.bounds = null;

	            this.maxSize = null;

	            this.minSize = null;

	            this.bgColor = null;

	            this.border = null;
	        },
	        //call the parent to repaint this figure's rectangle
	        /**
	         * 擦除，通常处理方式为请求父图形重绘该子图形的区域。
	         */
	        erase: function() {
	            if (!this.getParent() || !this.isVisible()) {
	                return;
	            }
	            var r = new Rectangle(this.getBounds());
	            this.getParent().translateToParent(r);
	            this.getParent().repaint(r.x, r.y, r.width, r.height);
	        },
	        findDescendantAtExcluding: function(x, y, search) {
	            Figure.PRIVATE_POINT.setLocation(x, y);
	            this.translateFromParent(Figure.PRIVATE_POINT);
	            if (!this.getClientArea(Rectangle.SINGLETON).contains(Figure.PRIVATE_POINT)) {
	                return null;
	            }
	            x = Figure.PRIVATE_POINT.x;
	            y = Figure.PRIVATE_POINT.y;
	            var fig;
	            for (var i = this.children.length; i > 0;) {
	                i--;
	                fig = this.children[i];
	                if (fig.isVisible()) {
	                    fig = fig.findFigureAt(x, y, search);
	                    if (fig != null) {
	                        return fig;
	                    }
	                }
	            }
	            return null;
	        },
	        /**
	         * 根据坐标找到该处的图形
	         * @param {Point/Number} arg1
	         * @param {Number} arg2
	         * @param {TreeSearch} arg3
	         */
	        findFigureAt: function(arg1, arg2, arg3) {
	            if (arg1 == null) {
	                return;
	            }
	            if (arg3 != null && util.isInstanceOf(arg3, TreeSearch)) {

	                if (!this.containsPoint(arg1, arg2)) {
	                    return null;
	                }
	                if (arg3.prune(this)) {
	                    return null;
	                }
	                var child = this.findDescendantAtExcluding(arg1, arg2, arg3);

	                if (child != null) {
	                    return child;
	                }
	                if (arg3.accept(this)) {
	                    return this;
	                }
	                return null;
	            }
	            if (util.isInstanceOf(arg1, Point)) {
	                return this.findFigureAtExcluding(arg1.x, arg1.y, Figure.EMPTY_LIST);
	            } else if (arg2 != null) {
	                return this.findFigureAt(arg1, arg2, IdentitySearch.INSTANCE);
	            }

	        },

	        findFigureAtExcluding: function(x, y, c) {

	            return this.findFigureAt(x, y, new ExclusionSearch(c));
	        },
	        findMouseEventTargetAt: function(x, y) {

	            if (!this.containsPoint(x, y)) {
	                return null;
	            }
	            var f = this.findMouseEventTargetInDescendantsAt(x, y);
	            if (f != null) {
	                return f;
	            }
	            if (this.isMouseEventTarget()) {
	                return this;
	            }
	            return null;
	        },
	        findMouseEventTargetInDescendantsAt: function(x, y) {
	            Figure.PRIVATE_POINT.setLocation(x, y);
	            this.translateFromParent(Figure.PRIVATE_POINT);
	            if (!this.getClientArea(Rectangle.SINGLETON).contains(Figure.PRIVATE_POINT)) {
	                return null;
	            }
	            var fig;
	            for (var i = this.children.length; i > 0;) {
	                i--;
	                fig = this.children[i];


	                if (fig.isVisible() && fig.isEnabled()) {
	                    if (fig.containsPoint(Figure.PRIVATE_POINT.x, Figure.PRIVATE_POINT.y)) {
	                        fig = fig.findMouseEventTargetAt(Figure.PRIVATE_POINT.x, Figure.PRIVATE_POINT.y);
	                        return fig;
	                    }
	                }

	            }


	            return null;
	        },
	        fireCoordinateSystemChanged: function() {
	            if (!this.eventListeners.containsListener("CoordinateListener")) {
	                return;
	            }
	            var figureListeners = this.eventListeners.getListeners("CoordinateListener");
	            while (figureListeners.hasNext()) {
	                figureListeners.next().coordinateSystemChanged(this);
	            }
	        },

	        fireFigureMoved: function() {
	            if (!this.eventListeners.containsListener("FigureListener")) {
	                return;
	            }
	            var figureListeners = this.eventListeners.getListeners("FigureListener");
	            while (figureListeners.hasNext()) {
	                figureListeners.next().figureMoved(this);
	            }
	        },
	        fireMoved: function() {
	            this.fireFigureMoved();
	            this.fireCoordinateSystemChanged();
	        },
	        firePropertyChange: function(property, old, current) {
	            if (this.propertyListeners == null) {
	                return;
	            }
	            this.propertyListeners.firePropertyChange(property, old, current);
	        },
	        /**
	         * 得到背景颜色
	         * @returns 本图形的背景颜色
	         * @type Color
	         */
	        getBackgroundColor: function() {
	            if (this.bgColor == null && this.getParent() != null) {
	                return this.getParent().getBackgroundColor();
	            }
	            return this.bgColor;
	        },
	        /**
	         * 得到Border
	         * @returns 本图形的border
	         * @type AbstractBorder
	         */
	        getBorder: function() {
	            return this.border;
	        },
	        /**
	         * 得到边界
	         * @returns 本图形的边界
	         * @type Rectangle
	         */
	        getBounds: function() {
	            return this.bounds;
	        },
	        /**
	         * 得到所有子图形
	         * @returns 所有子图形
	         * @type Array
	         */
	        getChildren: function() {
	            return this.children;
	        },
	        /**
	         * 得到客户区
	         * @returns 本图形的客户区
	         * @type Rectangle
	         */
	        getClientArea: function(rect) {
	            if (rect == null) {
	                rect = new Rectangle(0, 0, 0, 0);
	            }
	            rect.setBounds(this.getBounds());
	            rect.crop(this.getInsets());
	            if (this.useLocalCoordinates()) {
	                rect.setLocation(0, 0);
	            }
	            return rect;
	        },
	        /**
	         * 得到本图形的鼠标样式
	         * @returns 本图形的鼠标样式
	         * @type String
	         */
	        getCursor: function() {
	            if (this.cursor == null && this.getParent() != null) {
	                return this.getParent().getCursor();
	            }
	            return this.cursor;
	        },

	        getFlag: function(flag) {
	            return (this.flags & flag) != 0;
	        },
	        /**
	         * 得到本图形的字体
	         * @returns 本图形的字体
	         * @type String
	         */
	        getFont: function() {
	            if (this.font != null) {
	                return this.font;
	            }
	            if (this.getParent() != null) {
	                return this.getParent().getFont();
	            }
	            return null;
	        },
	        getForegroundColor: function() {
	            if (this.fgColor == null && this.getParent() != null) {
	                return this.getParent().getForegroundColor();
	            }
	            return this.fgColor;
	        },
	        /**
	         * 得到本图形的Insets
	         * @returns 本图形的Insets
	         * @type Insets
	         */
	        getInsets: function() {
	            if (this.border != null) {
	                return this.border.getInsets(this);
	            }
	            return Figure.NO_INSETS;
	        },
	        /**
	         * 得到本图形的布局管理器
	         * @returns 本图形的布局管理器
	         * @type LayoutManager
	         */
	        getLayoutManager: function() {
	            if (this.layoutManager != null && util.isInstanceOf(this.layoutManager, LayoutNotifier)) {
	                return this.layoutManager.realLayout;
	            }
	            return this.layoutManager;
	        },
	        /**
	         * 得到本图形上某一类监听器
	         * @param {String} clazz 类别
	         * @returns 属于这一类的所有监听器
	         * @type TypeIterator
	         */
	        getListeners: function(clazz) {
	            if (this.eventListeners == null) {
	                return EMPTY_IERATOR;

	            }
	            return this.eventListeners.getListeners(clazz);
	        },
	        getLocalBackgroundColor: function() {
	            return this.bgColor;
	        },
	        getLocalFont: function() {
	            return this.font;
	        },
	        getLocalForegroundColor: function() {
	            return this.fgColor;
	        },
	        /**
	         * 得到本图形的位置
	         * @returns 本图形的位置
	         * @type Point
	         */
	        getLocation: function() {
	            return new Point(this.getBounds().x, this.getBounds().y);
	        },
	        /**
	         * 得到本图形的最大大小
	         * @returns 本图形的最大大小
	         * @type Dimension
	         */
	        getMaximumSize: function() {
	            if (this.maxSize != null) {
	                return this.maxSize;
	            }
	            return Figure.MAX_DIMENSION;
	        },
	        /**
	         * 得到本图形的最小大小
	         * @param {Number} arg1 宽度提示值
	         * @param {Number} arg2 高度提示值
	         * @returns 本图形的最小大小
	         * @type Dimension
	         */
	        getMinimumSize: function(arg1, arg2) {
	            var wHint = arg1;
	            var hHint = arg2;
	            if (arg1 == null || arg2 == null) {
	                wHint = -1;
	                hHint = -1;
	            }
	            if (this.minSize != null) {
	                return this.minSize;
	            }
	            if (this.getLayoutManager() != null) {
	                var d = this.getLayoutManager().getMinimumSize(this, wHint, hHint);
	                if (d != null) {
	                    return d;
	                }
	            }
	            return this.getPreferredSize(wHint, hHint);

	        },
	        /**
	         * 得到父图形
	         * @returns 本图形的父图形
	         * @type Figure
	         */
	        getParent: function() {
	            return this.parent;
	        },
	        /**
	         * 得到首选大小
	         * @param {Number} width 宽度提示值
	         * @param {Number} height 高度提示值
	         * @returns 本图形的首先大小
	         * @type Dimension
	         */
	        getPreferredSize: function(width, height) {
	            var wHint = width;
	            var hHint = height;
	            if (width == null || height == null) {
	                wHint = -1;
	                hHint = -1;
	            }
	            if (this.prefSize) {
	                return this.prefSize;
	            }
	            if (this.layoutManager) {
	                var d = this.layoutManager.getPreferredSize(this, wHint, hHint);
	                if (d) {
	                    return d;
	                }
	            }
	            return this.getSize();
	        },
	        /**
	         * 得到大小
	         * @returns 本图形的大小
	         * @type Dimension
	         */
	        getSize: function() {
	            return this.getBounds().getSize();
	        },
	        getToolTip: function() {
	            return this.toolTip;
	        },
	        getUpdateManager: function() {
	            if (this.getParent()) {
	                return this.getParent().getUpdateManager();
	            } else {
	                return new UpdateManager();
	            }
	        },
	        handleFocusGained: function(event) {
	            var iter = this.eventListeners.getListeners("FocusListener");
	            var temp;
	            while (iter.hasNext()) {
	                temp = iter.next();
	                if (temp.focusGained != null) {
	                    temp.focusGained(event, this);
	                }
	            }
	        },
	        handleFocusLost: function(event) {
	            var iter = this.eventListeners.getListeners("FocusListener");
	            var temp;
	            while (iter.hasNext()) {
	                temp = iter.next();
	                if (temp.focusLost != null) {
	                    temp.focusLost(event, this);
	                }
	            }
	        },
	        handleKeyPressed: function(event) {
	            var iter = this.eventListeners.getListeners("KeyListener");
	            var temp;
	            while (!event.isConsumed() && iter.hasNext()) {
	                temp = iter.next();
	                if (temp.keyPressed != null) {
	                    temp.keyPressed(event, this);
	                }
	            }
	        },
	        handleKeyReleased: function(event) {
	            var iter = this.eventListeners.getListeners("KeyListener");
	            var temp;
	            while (!event.isConsumed() && iter.hasNext()) {
	                temp = iter.next();
	                if (temp.keyReleased != null) {
	                    temp.keyReleased(event, this);
	                }
	            }
	        },
	        handleMouseDoubleClicked: function(event) {
	            var iter = this.eventListeners.getListeners("MouseListener");
	            var temp;
	            while (!event.isConsumed() && iter.hasNext()) {
	                temp = iter.next();
	                if (temp.mouseDoubleClicked != null) {
	                    temp.mouseDoubleClicked(event, this);
	                }
	            }
	        },
	        handleMouseClicked: function(event) {
	            var iter = this.eventListeners.getListeners("MouseListener");
	            var temp;
	            while (!event.isConsumed() && iter.hasNext()) {
	                temp = iter.next();
	                if (temp.mouseClicked != null) {
	                    temp.mouseClicked(event, this);
	                }
	            }
	        },
	        handleMouseDragged: function(event) {
	            var iter = this.eventListeners.getListeners("MouseMotionListener");
	            var temp;
	            while (!event.isConsumed() && iter.hasNext()) {
	                temp = iter.next();
	                if (temp.mouseDragged != null) {
	                    temp.mouseDragged(event, this);
	                }
	            }
	        },
	        handleMouseEntered: function(event) {
	            var iter = this.eventListeners.getListeners("MouseMotionListener");
	            var temp;
	            while (!event.isConsumed() && iter.hasNext()) {
	                temp = iter.next();
	                if (temp.mouseEntered != null) {
	                    temp.mouseEntered(event, this);
	                }
	            }
	        },
	        handleMouseExited: function(event) {
	            var iter = this.eventListeners.getListeners("MouseMotionListener");
	            var temp;
	            while (!event.isConsumed() && iter.hasNext()) {
	                temp = iter.next();
	                if (temp.mouseExited != null) {
	                    temp.mouseExited(event, this);
	                }
	            }
	        },
	        handleMouseHover: function(event) {
	            var iter = this.eventListeners.getListeners("MouseMotionListener");
	            var temp;
	            while (!event.isConsumed() && iter.hasNext()) {
	                temp = iter.next();
	                if (temp.mouseHover != null) {
	                    temp.mouseHover(event, this);
	                }
	            }
	        },
	        handleMouseMoved: function(event) {
	            var iter = this.eventListeners.getListeners("MouseMotionListener");
	            var temp;
	            while (!event.isConsumed() && iter.hasNext()) {
	                temp = iter.next();
	                if (temp.mouseMoved != null) {
	                    temp.mouseMoved(event, this);
	                }
	            }
	        },
	        handleMousePressed: function(event) {
	            var iter = this.eventListeners.getListeners("MouseListener");
	            var temp;
	            while (!event.isConsumed() && iter.hasNext()) {
	                temp = iter.next();
	                if (temp.mousePressed != null) {
	                    temp.mousePressed(event, this);
	                }
	            }
	        },
	        handleMouseReleased: function(event) {
	            var iter = this.eventListeners.getListeners("MouseListener");
	            var temp;
	            while (!event.isConsumed() && iter.hasNext()) {
	                temp = iter.next();
	                if (temp.mouseReleased != null) {
	                    temp.mouseReleased(event, this);
	                }
	            }
	        },
	        hasFocus: function() {
	            var dispatcher = this.internalGetEventDispatcher();
	            if (dispatcher == null) {
	                return false;
	            }
	            return dispatcher.getFocusOwner() == this;
	        },
	        internalGetEventDispatcher: function() {
	            if (this.getParent() != null) {
	                return this.getParent().internalGetEventDispatcher();
	            }
	            return null;
	        },
	        intersects: function(rect) {
	            return this.getBounds().intersects(rect);
	        },
	        //invalidate this figure and it's layoutManager
	        /**
	         * 使得本图形无效
	         */
	        invalidate: function() {
	            if (this.layoutManager)
	                this.layoutManager.invalidate();
	            this.setValid(false);
	        },
	        /**
	         * 使得本图形以及其子图形树上的所有图形无效
	         */
	        invalidateTree: function() {
	            this.invalidate();
	            for (var i = 0; i < this.children.length; i++) {
	                this.children[i].invalidateTree();
	            }
	        },
	        /**
	         * 是否使用相对坐标系
	         * @returns 是否使用相对坐标系
	         * @type boolean
	         */
	        isCoordinateSystem: function() {
	            return this.useLocalCoordinates();
	        },
	        /**
	         * 是否可用
	         * @returns 是否可用
	         * @type boolean
	         */
	        isEnabled: function() {
	            return this.getFlag(FigureConstants.FLAG_ENABLED);
	        },
	        isFocusTraversable: function() {
	            return this.getFlag(FigureConstants.FLAG_FOCUS_TRAVERSABLE);
	        },
	        /**
	         * 是否接受鼠标事件
	         * @returns 是否接受鼠标事件
	         * @type boolean
	         */
	        isMouseEventTarget: function() {
	            return (this.eventListeners.containsListener("MouseListener") || this.eventListeners.containsListener("MouseMotionListener"));
	        },
	        isMirrored: function() {
	            //				if (this.getParent() != null){
	            //					return this.getParent().isMirrored();
	            //				}
	            return false;
	        },
	        /**
	         * 是否不透明
	         * @returns 是否不透明
	         * @type boolean
	         */
	        isOpaque: function() {
	            return this.getFlag(FigureConstants.FLAG_OPAQUE);
	        },
	        isRequestFocusEnabled: function() {
	            return this.getFlag(FigureConstants.FLAG_FOCUSABLE);
	        },
	        /**
	         * 是否显示
	         * @returns 是否显示
	         * @type boolean
	         */
	        isShowing: function() {
	            return this.isVisible() && (this.getParent() == null || this.getParent().isShowing());
	        },
	        /**
	         * 是否有效
	         * @returns 是否有效
	         * @type boolean
	         */
	        isValid: function() {
	            return this.getFlag(FigureConstants.FLAG_VALID);
	        },
	        /**
	         * 是否为有效化的根
	         * @returns 是否为有效化的根
	         * @type boolean
	         */
	        isValidationRoot: function() {
	            return false;
	        },
	        /**
	         * 是否可见
	         * @returns 是否可见
	         * @type boolean
	         */
	        isVisible: function() {
	            return this.getFlag(FigureConstants.FLAG_VISIBLE);
	        },
	        /**
	         * 为本图形布局
	         */
	        layout: function() {
	            if (this.layoutManager) {
	                this.layoutManager.layout(this);
	            }
	        },
	        /**
	         * 绘制本图形
	         * @param {Graphics} graphics 绘图对象
	         */
	        paint: function(graphics) {
	            graphics.pushState();

	            //设置前景色
	            if (this.getLocalForegroundColor() != null) {
	                graphics.setFillColor(this.getLocalForegroundColor());
	                graphics.setStrokeColor(this.getLocalForegroundColor());
	            }
	            if (this.font != null) {
	                graphics.setFont(this.font);
	            }

	            graphics.pushState();
	            this.paintFigure(graphics);
	            graphics.restoreState();
	            graphics.pushState();
	            this.paintClientArea(graphics);
	            graphics.restoreState();
	            graphics.pushState();
	            this.paintBorder(graphics);
	            graphics.restoreState();

	            graphics.restoreState();
	        },
	        paintBorder: function(graphics) {
	            if (this.getBorder() != null) {
	                this.getBorder().paint(this, graphics, Figure.NO_INSETS);
	            }
	        },
	        paintChildren: function(graphics) {
	            var child;
	            var clip = Rectangle.SINGLETON;
	            for (var i = 0; i < this.children.length; i++) {
	                child = this.children[i];
	                if (child.isVisible() && child.intersects(graphics.getClip(clip))) {
	                    graphics.pushState();
	                    graphics.clipRect(child.getBounds());
	                    child.paint(graphics);
	                    graphics.restoreState();
	                }
	            }
	        },
	        paintClientArea: function(graphics) {
	            if (this.children.length == 0) {
	                return;
	            }

	            var optimizeClip = this.getBorder() == null || this.getBorder().isOpaque();

	            if (this.useLocalCoordinates()) {
	                graphics.translate(this.getBounds().x + this.getInsets().left, this.getBounds().y + this.getInsets().top);
	                if (optimizeClip) {
	                    graphics.clipRect(this.getClientArea(Figure.PRIVATE_RECT));
	                }
	                graphics.pushState();
	                this.paintChildren(graphics);
	                graphics.restoreState();
	            } else {
	                if (optimizeClip) {
	                    this.paintChildren(graphics);
	                } else {
	                    graphics.clipRect(this.getClientArea(Figure.PRIVATE_RECT)); //??
	                    graphics.pushState();

	                    this.paintChildren(graphics);
	                    graphics.restoreState();
	                }
	            }

	        },
	        paintFigure: function(graphics) {
	            if (this.isOpaque()) {
	                //绘制背景颜色
	                if (this.getLocalBackgroundColor() != null) {
	                    graphics.pushState();
	                    graphics.setFillColor(this.getLocalBackgroundColor());
	                    graphics.fillRect(this.getBounds().x, this.getBounds().y, this.getBounds().width, this.getBounds().height);
	                    graphics.restoreState();
	                }

	            }
	            if (this.getBorder() != null && util.isInstanceOf(this.getBorder(), __webpack_require__(24))) {
	                this.getBorder().paintBackground(this, graphics, Figure.NO_INSETS);
	            }
	        },
	        primTranslate: function(dx, dy) {

	            this.getBounds().x += dx;
	            this.getBounds().y += dy;
	            if (this.useLocalCoordinates()) {
	                this.fireCoordinateSystemChanged();
	                return;
	            }
	            for (var i = 0; i < this.children.length; i++) {
	                this.children[i].translate(dx, dy);
	            }

	        },
	        /**
	         * 移除子图形
	         * @param {Figure} figure 需要移除的子图形
	         */
	        remove: function(figure) {
	            if ((figure.getParent() != this)) {
	                Debugger.log(this.id + "=>remove()--Figure is not a child");
	            }
	            if (this.getFlag(FigureConstants.FLAG_REALIZED)) {
	                figure.removeNotify();
	            }
	            if (this.layoutManager != null) {
	                this.layoutManager.remove(figure);
	            }
	            figure.erase();
	            figure.setParent(null);
	            util.Array.removeItem(this.children, figure);
	            this.revalidate();
	        },
	        /**
	         * 移除所有子图形
	         */
	        removeAll: function() {
	            while (this.children.length > 0) {
	                this.remove(this.children[0]);
	            }
	        },
	        removeAncestorListener: function(listener) {
	            if (this.ancestorHelper != null) {
	                this.ancestorHelper.removeAncestorListener(listener);
	                if (this.ancestorHelper.isEmpty()) {
	                    this.ancestorHelper.dispose();
	                    this.ancestorHelper = null;
	                }
	            }
	        },
	        removeCoordinateListener: function(listener) {
	            this.eventListeners.removeListener("CoordinateListener", listener);
	        },
	        removeFigureListener: function(listener) {
	            this.eventListeners.removeListener("FigureListener", listener);
	        },
	        removeFocusListener: function(listener) {
	            this.eventListeners.removeListener("FocusListener", listener);
	        },
	        removeKeyListener: function(listener) {
	            this.eventListeners.removeListener("KeyListener", listener);
	        },
	        removeLayoutListener: function(listener) {
	            if (util.isInstanceOf(this.layoutManager, LayoutNotifier)) {
	                util.Array.removeItem(this.layoutManager.listeners, listener);
	                if (this.layoutManager.listeners.length == 0) {
	                    this.layoutManager = this.layoutManager.realLayout;
	                }
	            }
	        },
	        /**
	         * 移除监听器
	         * @param {Stirng} clazz 监听器类别
	         * @param {Object} listener 需要移除的监听器
	         */
	        removeListener: function(clazz, listener) {
	            if (this.eventListeners == null) {
	                return;
	            }
	            this.eventListeners.removeListener(clazz, listener);
	        },
	        /**
	         * 移除鼠标监听器
	         * @param {Object} listener 需要移除的监听器
	         */
	        removeMouseListener: function(listener) {
	            this.eventListeners.removeListener("MouseListener", listener);
	        },
	        /**
	         * 移除鼠标移动监听器
	         * @param {Object} listener 需要移除的监听器
	         */
	        removeMouseMotionListener: function(listener) {
	            this.eventListeners.removeListener("MouseMotionListener", listener);
	        },
	        removeNotify: function() {
	            for (var i = 0; i < this.children.length; i++) {
	                this.children[i].removeNotify();
	            }
	            if (this.internalGetEventDispatcher() != null) {
	                this.internalGetEventDispatcher().requestRemoveFocus(this);
	            }
	            this.setFlag(FigureConstants.FLAG_REALIZED, false);
	        },
	        removePropertyChangeListener: function(property, listener) {
	            if (this.propertyListeners == null) return;
	            if (property != null && listener != null) {
	                this.propertyListeners.removePropertyChangeListener(property, listener);
	            } else {
	                var temp = (property != null ? property : listener);
	                this.propertyListeners.removePropertyChangeListener(temp);
	            }
	        },
	        /**
	         * 重绘
	         * repaint();
	         * repaint(Rectangle);
	         * repaint(Number,Number,Number,Number)
	         * @param {Rectangle/Number} arg1 需要重绘的范围/x坐标
	         * @param {Number} arg2 y坐标
	         * @param {Number} arg3 width
	         * @param {Number} arg4 height
	         */
	        repaint: function(arg1, arg2, arg3, arg4) {
	            var x;
	            var y;
	            var width;
	            var height;
	            if (arg1 == null) {
	                x = this.getBounds().x;
	                y = this.getBounds().y;
	                width = this.getBounds().width;
	                height = this.getBounds().height;
	            } else if (arg1 != null && util.isInstanceOf(arg1, Rectangle)) {
	                var rect = arguments[0];
	                x = rect.x;
	                y = rect.y;
	                width = rect.width;
	                height = rect.height;
	            } else if (arg1 != null && arg2 != null && arg3 != null && arg4 != null) {
	                x = arguments[0];
	                y = arguments[1];
	                width = arguments[2];
	                height = arguments[3];
	            }
	            if (this.isVisible() && width > 0 && height > 0) {
	                this.getUpdateManager().addDirtyRegion(this, x - 1, y - 1, width + 2, height + 2); //将脏区域扩大，以防止留有污渍。
	            }
	        },
	        requestFocus: function() {
	            if (!this.isRequestFocusEnabled() || this.hasFocus()) {
	                return;
	            }
	            var dispatcher = this.internalGetEventDispatcher();
	            if (dispatcher == null) {
	                return;
	            }
	            dispatcher.requestFocus(this);
	        },
	        /**
	         * 使本图形无效，并调用父图形的revalidate方法
	         */
	        revalidate: function() {
	            this.invalidate();
	            if ((!this.parent) || this.isValidationRoot()) {
	                this.getUpdateManager().addInvalidFigure(this);
	            } else {
	                this.getParent().revalidate();
	            }
	        },
	        /**
	         * 设置背景颜色
	         * @param {Color} bg 新的背景颜色
	         */
	        setBackgroundColor: function(bg) {
	            this.bgColor = bg;
	            this.repaint();
	        },
	        /**
	         * 设置Border
	         * @param {AbstractBorder} border 新的Border
	         */
	        setBorder: function(border) {
	            this.border = border;
	            this.revalidate();
	            this.repaint();
	        },
	        /**
	         * 设置边界
	         * @param {Rectangle} rect 新的边界
	         */
	        setBounds: function(rect) {
	            var x = this.getBounds().x;
	            var y = this.getBounds().y;

	            var resize = (rect.width != this.getBounds().width) || (rect.height != this.getBounds().height);
	            var translate = (rect.x != x) || (rect.y != y);

	            if ((resize || translate) && this.isVisible())
	                this.erase();
	            if (translate) {
	                var dx = rect.x - x;
	                var dy = rect.y - y;

	                this.primTranslate(dx, dy);
	            }

	            this.getBounds().width = rect.width;
	            this.getBounds().height = rect.height;
	            if (translate || resize) {
	                if (resize)
	                    this.invalidate();
	                this.fireFigureMoved();
	                this.repaint();
	            }
	        },
	        /**
	         * 为可以设置Direction的子图形设置Direction
	         * @param {Int} direction
	         */
	        setChildrenDirection: function(direction) {
	            var iterator = new FigureIterator(this);
	            var child;
	            while (iterator.hasNext()) {
	                child = iterator.nextFigure();
	                if (child.setDirection != null) {
	                    child.setDirection(direction);
	                }
	            }
	        },
	        /**
	         * 为所有子图形设置可用性
	         * @param {boolean} value 是否可用
	         */
	        setChildrenEnabled: function(value) {
	            var iterator = new FigureIterator(this);
	            while (iterator.hasNext()) {
	                iterator.nextFigure().setEnabled(value);
	            }
	        },
	        /**
	         * 为可以设置Orientation的子图形设置Orientation
	         * @param {Int} orientation
	         */
	        setChildrenOrientation: function(orientation) {
	            var iterator = new FigureIterator(this);
	            var child;
	            while (iterator.hasNext()) {
	                child = iterator.nextFigure();
	                if (child.setOrientation != null) {
	                    child.setOrientation(orientation);
	                }
	            }
	        },
	        /**
	         * 为子图形设置约束
	         * @param {Figure} child 子图形
	         * @param {Object} constraint 约束
	         */
	        setConstraint: function(child, constraint) {
	            if (child.getParent() != this) {
	                Debugger.log(this.id + "=>Figure--setConstraint()--Figure must be a child");
	            }
	            if (this.layoutManager != null) {
	                this.layoutManager.setConstraint(child, constraint);
	            }
	            this.revalidate();
	        },
	        /**
	         * 为图形设置鼠标样式
	         * @param {String} cursor 鼠标样式
	         */
	        setCursor: function(cursor) {
	            if (this.cursor == cursor) {
	                return;
	            }
	            this.cursor = cursor;
	            var dispatcher = this.internalGetEventDispatcher();
	            if (dispatcher != null) {
	                dispatcher.updateCursor();
	            }
	        },
	        /**
	         * 设置图形是否可用
	         * @param {boolean} value 是否可用
	         */
	        setEnabled: function(value) {
	            if (this.isEnabled() == value) {
	                return;
	            }
	            this.setFlag(FigureConstants.FLAG_ENABLED, value);
	        },
	        setFlag: function(flag, value) {
	            if (value)
	                this.flags |= flag;
	            else
	                this.flags &= ~flag;
	        },
	        setFocusTraversable: function(focusTraversable) {
	            if (this.isFocusTraversable() == focusTraversable) {
	                return;
	            }
	            this.setFlag(FigureConstants.FLAG_FOCUS_TRAVERSABLE, focusTraversable);
	        },
	        /**
	         * 设置图形字体
	         * @param {String} f 字体
	         */
	        setFont: function(f) {
	            if (this.font != f) {
	                this.font = f;
	                this.revalidate();
	                this.repaint();
	            }
	        },
	        setForegroundColor: function(fg) {
	            if (this.fgColor != null && this.fgColor.equals(fg)) {
	                return;
	            }
	            this.fgColor = fg;
	            this.repaint();
	        },
	        /**
	         * 设置布局管理器
	         * @param {LayoutManager} layoutManager 布局管理器
	         */
	        setLayoutManager: function(layoutManager) {
	            if (this.layoutManager != null && util.isInstanceOf(this.layoutManager, LayoutNotifier)) {
	                this.layoutManager.realLayout = layoutManager;
	            } else {
	                this.layoutManager = layoutManager;
	            }
	            this.revalidate();
	        },
	        /**
	         * 设置本图形的位置
	         * @param {Point} p 本图形的新位置
	         */
	        setLocation: function(p) {
	            if (this.getLocation().equals(p)) {
	                return;
	            }
	            var r = new Rectangle(this.getBounds());
	            r.setLocation(p);
	            this.setBounds(r);
	        },
	        /**
	         * 设置本图形的最大大小
	         * @param {Dimension} d 本图形的新的最大大小
	         */
	        setMaximumSize: function(d) {
	            if (this.maxSize != null && this.maxSize.equals(d)) {
	                return;
	            }
	            this.maxSize = d;
	            this.revalidate();
	        },
	        /**
	         * 设置本图形的最小大小
	         * @param {Dimension} d 本图形的新的最小大小
	         */
	        setMinimumSize: function(d) {
	            if (this.minSize != null && this.minSize.equals(d)) {
	                return;
	            }
	            this.minSize = d;
	            this.revalidate();
	        },
	        /**
	         * 设置是否不透明
	         * @param {boolean} value 是否不透明
	         */
	        setOpaque: function(value) {
	            this.setFlag(FigureConstants.FLAG_OPAQUE, value);
	        },
	        /**
	         * 设置父图形
	         * @param {Figure} parent 设置父图形
	         */
	        setParent: function(p) {
	            var oldParent = this.parent;
	            this.parent = p;
	            this.firePropertyChange("parent", oldParent, p);
	        },
	        /**
	         * 设置首选大小
	         * setPreferredSize(Dimension)或者setPreferredSize(Number,Number);
	         * @param {Dimension/Number} arg1 新的首选大小/新的首选宽度
	         * @param {Dimension/Number} arg2 新的首选高度
	         */
	        setPreferredSize: function(arg1, arg2) {
	            if (arg1 == null) {
	                return;
	            }
	            var size;
	            if (util.isInstanceOf(arg1, Dimension)) {
	                size = arg1;
	            } else {
	                size = new Dimension(arg1, arg2);
	            }
	            if (this.prefSize != null && this.prefSize.equals(size)) {
	                return;
	            }
	            this.prefSize = size;
	            this.revalidate();
	        },
	        setRequestFocusEnabled: function(requestFocusEnabled) {
	            if (this.isRequestFocusEnabled() == requestFocusEnabled) {
	                return;
	            }
	            this.setFlag(FigureConstants.FLAG_FOCUSABLE, requestFocusEnabled);
	        },
	        /**
	         * 设置大小
	         * setSize(Dimension)或者setSize(Number,Number);
	         * @param {Dimension/Number} arg1 新的大小/新的宽度
	         * @param {Number} arg2 新的高度
	         */
	        setSize: function(arg1, arg2) {
	            if (arg1 == null) {
	                return;
	            }
	            var w;
	            var h;
	            if (util.isInstanceOf(arg1, Dimension)) {
	                w = arg1.width;
	                h = arg1.height;
	            } else {
	                w = arg1;
	                h = arg2;
	            }
	            var bounds = this.getBounds();
	            if (bounds.width == w && bounds.height == h) {
	                return;
	            }
	            var r = new Rectangle(this.getBounds());
	            r.setSize(w, h);
	            this.setBounds(r);
	        },
	        setToolTip: function(f) {
	            if (this.toolTip == f) {
	                return;
	            }
	            this.toolTip = f;
	        },
	        /**
	         * 设置有效性
	         * @param {boolean} value 是否有效
	         */
	        setValid: function(value) {
	            this.setFlag(FigureConstants.FLAG_VALID, value);
	        },
	        /**
	         * 设置可见性
	         * @param {boolean} visible 是否可见
	         */
	        setVisible: function(visible) {
	            var currentVisibility = this.isVisible();
	            if (visible == currentVisibility) {
	                return;
	            }
	            if (currentVisibility) {
	                this.erase();
	            }
	            this.setFlag(FigureConstants.FLAG_VISIBLE, visible);
	            if (visible) {
	                this.repaint();
	            }
	            this.revalidate();
	        },
	        /**
	         * 移动图形
	         * @param {Number} x 横向移动值
	         * @param {Number} y 纵向移动值
	         */
	        translate: function(x, y) {
	            this.primTranslate(x, y);
	            this.fireFigureMoved();
	        },
	        translateFromParent: function(rect) {
	            if (this.useLocalCoordinates()) {
	                rect.performTranslate(-this.getBounds().x - this.getInsets().left, -this.getBounds().y - this.getInsets().top);
	            }
	        },
	        translateToAbsolute: function(rect) {
	            if (this.getParent() != null) {
	                this.getParent().translateToParent(rect);
	                this.getParent().translateToAbsolute(rect);
	            }
	        },
	        translateToParent: function(rect) {
	            if (this.useLocalCoordinates()) {
	                rect.performTranslate(this.getBounds().x + this.getInsets().left, this.getBounds().y + this.getInsets().top);
	            }
	        },
	        translateToRelative: function(rect) {
	            if (this.getParent() != null) {
	                this.getParent().translateToRelative(rect);
	                this.getParent().translateFromParent(rect);
	            }
	        },
	        /**
	         * 是否使用相对坐标
	         * @returns 是否使用相对坐标
	         * @type boolean
	         */
	        useLocalCoordinates: function() {
	            return false;
	        },
	        //validate this figure and it's children
	        /**
	         * 使本图形有效
	         */
	        validate: function() {
	            if (this.isValid()) {
	                return;
	            }
	            this.setValid(true);
	            this.layout();
	            var i;
	            for (i = 0; i < this.children.length; i++) {
	                this.children[i].validate();
	            }
	        }
	    });

	    return Figure;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));


/***/ },
/* 26 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;//将NoInsets从Figure中单独分离出来
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(13),
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, Insets, util) {
	    'use strict';

	    var NoInsets = function() {
	        NoInsets.superclass.constructor.call(this, 0, 0, 0, 0);

	    };
	    //static properties
	    util.defineClass(NoInsets, Insets, {
	        isEmpty: function() {
	            return true;
	        }
	    });

	    return NoInsets;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 27 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    var TreeSearch = function() {
	        TreeSearch.superclass.constructor.call(this);
	    };

	    //static properties
	    util.defineClass(TreeSearch, Object, {
	        accept: function(figure) {},
	        prune: function(figure) {}
	    });

	    return TreeSearch;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 28 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require) {
	    'use strict';

	    var FigureConstants = {};

	    /**
	     * @static
	     * @field
	     */
	    FigureConstants.FLAG_VALID = 1,
	        /**
	         * @static
	         * @field
	         */
	        FigureConstants.FLAG_OPAQUE = 1 << 1;
	    /**
	     * @static
	     * @field
	     */
	    FigureConstants.FLAG_VISIBLE = 1 << 2;
	    /**
	     * @static
	     * @field
	     */
	    FigureConstants.FLAG_FOCUSABLE = 1 << 3;
	    /**
	     * @static
	     * @field
	     */
	    FigureConstants.FLAG_ENABLED = 1 << 4;
	    /**
	     * @static
	     * @field
	     */
	    FigureConstants.FLAG_FOCUS_TRAVERSABLE = 1 << 5;
	    /**
	     * @static
	     * @field
	     */
	    FigureConstants.FLAG_REALIZED = 1 << 31;
	    /**
	     * @static
	     * @field
	     */
	    FigureConstants.MAX_FLAG = FigureConstants.FLAG_FOCUS_TRAVERSABLE;

	    return FigureConstants;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 29 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(30)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, TypeIterator) {
	    'use strict';

	    /**
	     * EventListenerList类,可以将监听器按类存放；可以得到指定类的所有迭代器，也可以删除指定类的指定监听器；
	     *
	     */
	    /**
	     * @class 事件监听器列表
	     * @constructor
	     * @returns
	     */
	    var EventListenerList = function() {
	        EventListenerList.superclass.constructor.call(this);
	        this.array = [];

	    };

	    //static properties
	    util.defineClass(EventListenerList, Object, {
	        /**
	         * 添加监听器
	         * @param {String} type 监听器类型
	         * @param {Object} listener 监听器
	         */
	        addListener: function(type, listener) {
	            if (!(this.array && listener)) {
	                throw ("EventListener-addListener-IllegalArgumentException");
	                return;
	            }
	            this.array.push(type);
	            this.array.push(listener);
	        },
	        /**
	         * 是否包含某类监听器
	         * @param {String} type 监听器类型
	         * @type boolean
	         */
	        containsListener: function(type) {
	            var i;
	            for (i = 0; i < this.array.length; i += 2) {
	                if (this.array[i] == type) {
	                    return true;
	                }
	            }
	            return false;
	        },
	        /**
	         * 得到某种类型的监听器
	         * @param {String} type 监听器类型
	         * @returns 一个迭代器
	         * @type TypeIterator
	         */
	        getListeners: function(type) {
	            return new TypeIterator(this.array, type);
	        },
	        /**
	         * 移除监听器
	         * @param {String} type 监听器类型
	         * @param {Object} listener 要移除的监听器
	         */
	        removeListener: function(type, listener) {
	            if (this.array.length == 0) {
	                return;
	            }
	            if (!(type && listener)) {
	                throw ("EventListenerList-removeListener-IllegalArgumentException");
	                return;
	            }
	            var i;
	            for (i = 0; i < this.array.length; i += 2) {
	                if (this.array[i] == type && this.array[i + 1] == listener) {
	                    break;
	                }
	            }
	            if (i == this.array.length) {
	                return;
	            }
	            this.array.splice(i, 2);
	        }
	    });

	    return EventListenerList;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 30 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    /**
	     *
	     * @class 以类划分的迭代器
	     * @constructor
	     */
	    var TypeIterator = function(items, type) {
	        TypeIterator.superclass.constructor.call(this);
	        this._items = items;
	        this._type = type;
	        this._index = 0;
	    };

	    //static properties
	    util.defineClass(TypeIterator, Object, {
	        /**
	         * 得到下一个值
	         */
	        next: function() {
	            var result = this._items[this._index + 1];
	            this._index += 2;
	            return result;
	        },
	        /**
	         * 是否还有下一个值
	         */
	        hasNext: function() {
	            if (!this._items) {
	                return false;
	            }
	            while (this._index < this._items.length && (this._items[this._index] != this._type)) {
	                this._index += 2;
	            }
	            return this._index < this._items.length;
	        }
	    });

	    var EMPTY_IERATOR = {
	        next: function() { return null; },
	        hasNext: function() { return false; }
	    };
	    // return {
	    //     EMPTY_IERATOR:EMPTY_IERATOR,
	    //     TypeIterator:TypeIterator
	    // };

	    return TypeIterator;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 31 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    var AncestorHelper = function(baseFigure) {
	        AncestorHelper.superclass.constructor.call(this);
	        this.base = baseFigure;
	        this.listeners = [];
	        this.addAncestors(baseFigure);

	    };

	    //static properties
	    util.defineClass(AncestorHelper, Object, {
	        addAncestorListener: function(listener) {
	            if (this.listeners == null) {
	                this.listeners = [];
	                this.listeners.push(listener);
	            } else {
	                this.listeners.push(listener);
	            }
	        },
	        addAncestors: function(rootFigure) {
	            for (var ancestor = rootFigure; ancestor != null; ancestor = ancestor.getParent()) {
	                ancestor.addFigureListener(this);
	                ancestor.addPropertyChangeListener("parent", this);
	            }
	        },
	        dispose: function() {
	            this.removeAncestors(this.base);
	            this.listeners = null;
	        },
	        figureMoved: function(ancestor) {
	            this.fireAncestorMoved(ancestor);
	        },
	        fireAncestorMoved: function(ancestor) {
	            if (this.listeners == null) {
	                return;
	            }
	            for (var i = 0; i < this.listeners.length; i++) {
	                this.listeners[i].ancestorMoved(ancestor);
	            }
	        },
	        fireAncestorAdded: function(ancestor) {
	            if (this.listeners == null) {
	                return;
	            }
	            for (var i = 0; i < this.listeners.length; i++) {
	                this.listeners[i].ancestorAdded(ancestor);
	            }
	        },
	        fireAncestorRemoved: function(ancestor) {
	            if (this.listeners == null) {
	                return;
	            }
	            for (var i = 0; i < this.listeners.length; i++) {
	                this.listeners[i].ancestorRemoved(ancestor);
	            }
	        },
	        isEmpty: function() {
	            return this.listeners == null;
	        },
	        propertyChange: function(event) {
	            if (event.getPropertyName() == "parent") {
	                var oldParent = event.getOldValue();
	                var newParent = event.getNewValue();
	                if (oldParent != null) {
	                    this.removeAncestors(oldParent);
	                    this.fireAncestorRemoved(oldParent);
	                }
	                if (newParent != null) {
	                    this.addAncestors(newParent);
	                    this.fireAncestorAdded(newParent);
	                }
	            }
	        },
	        removeAncestorListener: function(listener) {
	            if (this.listeners == null) {
	                return;
	            }
	            for (var index = 0; index < this.listeners.length; index++) {
	                if (this.listeners[index] == listener) {
	                    this.listeners.splice(index, 1);
	                    return;
	                }
	            }
	        },
	        removeAncestors: function(rootFigure) {
	            for (var ancestor = rootFigure; ancestor != null; ancestor = ancestor.getParent()) {
	                ancestor.removeFigureListener(this);
	                ancestor.removePropertyChangeListener("parent", this);
	            }
	        }

	    });

	    return AncestorHelper;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 32 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(27)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, TreeSearch) {
	    'use strict';

	    var ExclusionSearch = function(c) {
	        ExclusionSearch.superclass.constructor.call(this);
	        this.c = c;
	    };

	    //static properties
	    util.defineClass(ExclusionSearch, TreeSearch, {
	        accept: function(figure) {
	            return true;
	        },
	        prune: function(figure) {
	            if (this.c != null && this.c.length > 0) {
	                return util.Array.contains(this.c, figure);
	            }
	            return false;
	        }
	    });

	    return ExclusionSearch;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 33 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(5),
	    __webpack_require__(12)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Map, Rectangle) {
	    'use strict';

	    var showPerformUpdateTime = false;
	    var DEBUG_DRAWDAMAGE = false;
	    var DEBUG_SHOWDAMAGE = false;

	    /**
	     *
	     * @class 更新管理器
	     * @constructor
	     * @returns
	     */
	    var UpdateManager = function() {
	        UpdateManager.superclass.constructor.call(this);
	        this.dirtyRegions = new Map();
	        this.updateQueued;
	        this.invalidFigures = [];
	        this.disposed = false;

	    };


	    //static properties
	    util.defineClass(UpdateManager, Object, {
	        /**
	         * 增加脏区域addDirtyRegion(figure,rect);addDirtyRegion(figure,x,y,width,height);
	         */
	        addDirtyRegion: function(arg1, arg2, arg3, arg4, arg5) {
	            var figure;
	            var rect;
	            if (arg1 == null || arg2 == null) {
	                return;
	            }
	            if (util.isInstanceOf(arg2, Rectangle)) {
	                figure = arg1;
	                rect = arg2;
	            } else if (arguments.length == 5) {
	                figure = arguments[0];
	                rect = new Rectangle(arguments[1], arguments[2], arguments[3], arguments[4]);
	            }
	            if (rect.isEmpty()) {
	                return;
	            }
	            var oldRect = this.dirtyRegions.get(figure);

	            if (!oldRect) {
	                this.dirtyRegions.put(figure, rect);
	            } else {
	                oldRect.union(rect);
	            }
	            this.fireAddDirty();
	            this.queueWork();
	        },

	        /**
	         * 增加无效图形
	         * @param {Figure} f
	         */
	        addInvalidFigure: function(f) {
	            if (util.Array.contains(this.invalidFigures, f)) {
	                return;
	            }
	            this.queueWork();
	            this.invalidFigures.push(f);
	        },
	        fireAddDirty: function() {
	            if (this.dirtyListener != null) {
	                this.dirtyListener();
	            }
	        },
	        //请求重绘
	        queueWork: function() {
	            var updater = this;
	            if (!this.updateTimeout) {
	                this.updateTimeout = setTimeout(function() {
	                    updater.performUpdate();
	                    updater.updateTimeout = null;
	                }, 0);
	            }
	        },

	        /**
	         * 设置脏区域监听器,脏区域增加时会通知此监听器
	         */
	        setDirtyListener: function(listener) {
	            this.dirtyListener = listener;
	        },
	        /**
	         * 移除脏区域监听器
	         * @see #setDirtyListener
	         */
	        removeDirtyListener: function() {
	            this.dirtyListener = null;
	        },
	        fireValidating: function() {
	            //TODO
	        },
	        getGraphics: function(rect) {
	            if (this.graphicsSource) {
	                return this.graphicsSource.getGraphics(rect);
	            }
	        },
	        releaseGraphics: function(graphics) {
	            this.graphicsSource.flushGraphics(this.damage);
	        },
	        repairDamage: function() {
	            var map = this.dirtyRegions.map;
	            if (map.length == 0) {
	                return;
	            }
	            //---------------debug-------------
	            //var rect;
	            //var i;
	            //for(i=0;i<map.length -1;i += 2){
	            //	Debugger.log("figure:["+map[i].id+"]");
	            //	rect = map[i+1];
	            //	Debugger.log("dirty:["+rect.x+","+rect.y+","+rect.width+","+rect.height+"]");
	            //}
	            //---------------debug------------
	            var keys = this.dirtyRegions.keySetIterator();
	            var contribution;
	            var figure;
	            var walker;

	            while (keys.hasNext()) {
	                figure = keys.next();
	                walker = figure.getParent();
	                contribution = this.dirtyRegions.get(figure);
	                contribution.intersect(figure.getBounds());
	                while (!contribution.isEmpty() && walker) {
	                    walker.translateToParent(contribution);
	                    contribution.intersect(walker.getBounds());
	                    walker = walker.getParent();
	                }
	                if (!this.damage) {
	                    this.damage = new Rectangle(contribution);
	                } else {
	                    this.damage.union(contribution);
	                }
	            }

	            if (!this.dirtyRegions.isEmpty()) {
	                var oldRegions = this.dirtyRegions;
	                this.dirtyRegions = new Map();
	                //this.firePainting(this.damage,oldRegions);
	            }
	            if (this.damage && !this.damage.isEmpty()) {

	                //消除小数，如果重绘区域有小数，会出现白色的边框。
	                //此逻辑有问题
	                //					this.damage.x = (this.damage.x << 0);
	                //					this.damage.y = (this.damage.y << 0);
	                //					this.damage.width = (this.damage.width << 0);
	                //					this.damage.height = (this.damage.height << 0);
	                //消除小数
	                try {
	                    var graphics = this.getGraphics(this.damage);
	                } catch (e) {
	                    if (console && console.error) {
	                        console.error(e);
	                    }

	                }
	                if (graphics) {
	                    // try {
	                    var clip = graphics.getClip(new Rectangle(0, 0, 0, 0));
	                    //for debug
	                    // console.log(this.root.children[0].children[0].children[0].children[0].children[0].children[0]);
	                    this.root.paint(graphics);
	                    // } catch (e) {
	                    //   if (console && console.error) {
	                    //     console.error(e);
	                    //   }
	                    // }
	                    // try {
	                    this.releaseGraphics(graphics);
	                    // } catch (e) {
	                    //   if (console && console.error) {
	                    //     console.error(e);
	                    //   }
	                    // }
	                }
	                //---------------debug-------------
	                //直接在界面上显示重绘区域
	                if (DEBUG_SHOWDAMAGE) {
	                    this.graphicsSource.control.context.clearRect(0, 0, 200, 50);
	                    this.graphicsSource.control.context.fillText("damage:[" + this.damage.x + "," + this.damage.y + "," + this.damage.width + "," + this.damage.height + "]", 0, 22);

	                    if (clip != null) {
	                        this.graphicsSource.control.context.fillText("clip:[" + clip.x + "," + clip.y + "," + clip.width + "," + clip.height + "]", 0, 40);
	                    }
	                }
	                if (DEBUG_DRAWDAMAGE) {
	                    this.graphicsSource.control.context.beginPath();
	                    this.graphicsSource.control.context.rect(this.damage.x, this.damage.y, this.damage.width, this.damage.height);
	                    this.graphicsSource.control.context.stroke();
	                }
	                //---------------debug-------------
	            }
	            this.damage = null;
	        },
	        setGraphicsSource: function(gs) {
	            this.graphicsSource = gs;
	        },
	        setRoot: function(root) {
	            this.root = root;
	        },
	        paint: function(canvas) {

	            /*
	            if(!this.validating){
	              var graphicsSource = new GraphicsSource(canvas);
	              var graphics = graphicsSource.getGraphics(canvas.getClipping());
	              if(graphics){
	                this.root.paint(graphics);
	                alert("xx");
	                graphicsSource.flushGraphics(canvas.getClipping());
	              }
	            }else{
	            */
	            this.root.invalidateTree();
	            this.root.validate();
	            this.root.repaint();
	            //this.addDirtyRegion(this.root, canvas.getClipping());

	            //alert("xx");
	            this.performUpdate();
	            //}

	        },
	        performUpdate: function() {
	            //-----------------debug-----------------
	            //记录开始时间
	            var startDate;
	            if (showPerformUpdateTime) {
	                startDate = new Date().getTime();
	            }
	            //-----------------debug-----------------
	            if (this.disposed || this.updating) {
	                return;
	            }
	            this.performValidation();
	            this.updating = true;

	            this.repairDamage();
	            // runnableChain ....
	            this.updating = false;

	            //-----------------debug-----------------
	            if (showPerformUpdateTime) {
	                var endDate = new Date().getTime();
	                //					function getDeltaSenconds(start,end){
	                //						var ss = start.getSeconds();
	                //						var sm = start.getMilliseconds();
	                //						var es = endDate.getSeconds();
	                //						var em = endDate.getMilliseconds();
	                //						delta = es*1000 + em -(ss*1000+sm);
	                //						return delta;
	                //					}
	                Debugger.log("performUpdate: " + (endDate - startDate) + "ms");
	            }
	            //-----------------debug-----------------
	        },

	        //validate all the figure in this.invalidFigures array and clear the array.
	        performValidation: function() {
	            if (this.invalidFigures.length == 0 || this.validating) {
	                return;
	            }
	            this.validating = true;
	            this.fireValidating();
	            var figure;
	            while (this.invalidFigures.length > 0) {
	                figure = this.invalidFigures.shift();
	                figure.validate();
	            }
	            this.validating = false;
	        },
	        dispose: function() {
	            if (this.disposed) {
	                return;
	            }
	            this.disposed = true;
	            if (this.invalidFigures) {
	                for (var i = 0; i < this.invalidFigures.length; i++) {
	                    this.invalidFigures[i] = null;
	                }
	                this.invalidFigures = null;
	            }

	            if (this.root && this.root.dispose) {
	                this.root.dispose();
	            }
	            this.root = null;

	            if (this.graphicsSource && this.graphicsSource.dispose) {
	                this.graphicsSource.dispose();
	            }
	            this.graphicsSource = null;

	        }

	    });

	    return UpdateManager;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 34 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    var FigureIterator = function(figure) {
	        FigureIterator.superclass.constructor.call(this);
	        this.list = figure.children;
	        this.index = this.list.length;

	    };

	    //static properties
	    util.defineClass(FigureIterator, Object, {
	        nextFigure: function() {
	            return this.list[--this.index];
	        },
	        hasNext: function() {
	            return this.index > 0;
	        }
	    });

	    return FigureIterator;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 35 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;//将IdentitySearch从Figure中单独分离出来
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(27),
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, TreeSearch, util) {
	    'use strict';

	    var IdentitySearch = function(figure) {
	        IdentitySearch.superclass.constructor.call(this);
	        this.host = figure;
	    };
	    util.defineClass(IdentitySearch, TreeSearch, {
	        accept: function(f) {
	            return true;
	        },
	        prune: function(f) {
	            return false;
	        }
	    });
	    //static properties
	    IdentitySearch.INSTANCE = new IdentitySearch();

	    return IdentitySearch;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 36 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;//将lauoutNotifier从Figure中单独分离出来

	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    var LayoutNotifier = function(layout, listener, host) {
	        LayoutNotifier.superclass.constructor.call(this);
	        this.host = host;
	        this.realLayout = layout;
	        this.listeners = [];
	        this.listeners.push(listener);
	    };
	    //static properties
	    util.defineClass(LayoutNotifier, Object, {
	        getConstraint: function(child) {
	            if (this.realLayout != null) {
	                return this.realLayout.getConstraint(child);
	            }
	            return null;
	        },
	        getMinimumSize: function(container, wHint, hHint) {
	            if (this.realLayout != null) {
	                return this.realLayout.getMinimumSize(container, wHint, hHint);
	            }
	            return null;
	        },
	        getPreferredSize: function(container, wHint, hHint) {
	            if (this.realLayout != null) {
	                return this.realLayout.getPreferredSize(container, wHint, hHint);
	            }
	            return null;
	        },
	        invalidate: function() {
	            for (var i = 0; i < this.listeners.length; i++) {
	                this.listeners[i].invalidate(host);
	            }
	            if (this.realLayout != null) {
	                this.realLayout.invalidate();
	            }
	        },
	        layout: function(container) {
	            var consumed = false;
	            for (var i = 0; i < this.listeners.length; i++) {
	                consumed |= this.listeners[i].layout(container);
	            }
	            if (this.realLayout != null && !consumed) {
	                this.realLayout.layout(container);
	            }
	            for (var i = 0; i < this.listeners.length; i++) {
	                this.listeners[i].postLayout(container);
	            }
	        },
	        remove: function(child) {
	            for (var i = 0; i < this.listeners.length; i++) {
	                this.listeners[i].remove(child);
	            }
	            if (this.realLayout != null) {
	                this.realLayout.remove(child);
	            }
	        },
	        setConstraint: function(child, constraint) {
	            for (var i = 0; i < this.listeners.length; i++) {
	                this.listeners[i].setConstraint(child, constraint);
	            }
	            if (this.realLayout != null) {
	                this.realLayout.setConstraint(child, constraint);
	            }
	        }
	    });

	    return LayoutNotifier;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 37 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(23),
	    __webpack_require__(10),
	    __webpack_require__(19),
	    __webpack_require__(22)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractBorder, Dimension, FigureUtilities, ColorConstants) {
	    'use strict';

	    /**
	     * @class 抽象的标签类
	     * @constructor
	     * @extends AbstractBorder
	     * @param {String} s 标签内容
	     */
	    var AbstractLabeledBorder = function() {
	        AbstractLabeledBorder.superclass.constructor.call(this);
	        this.textExtents = null;
	        this.label = null;
	        this.insets = null;
	        this.textColor = ColorConstants.black;
	        this.font = null;
	        this.setLabel(s);

	    };

	    //static properties
	    util.defineClass(AbstractLabeledBorder, AbstractBorder, {
	        calculateInsets: function() {

	        },
	        /**
	         * 得到字体
	         * @type String
	         */
	        getFont: function(figure) {
	            if (this.font == null) {
	                return figure.getFont();
	            }
	            return this.font;
	        },
	        /**
	         * 得到插入值
	         * @type Insets
	         */
	        getInsets: function(figure) {
	            if (this.insets == null) {
	                this.insets = this.calculateInsets(figure);
	            }
	            return this.insets;
	        },
	        /**
	         * 得到将显示的内容
	         * @type String
	         */
	        getLabel: function() {
	            return this.label;
	        },
	        /**
	         * 得到首选大小
	         * @type Dimension
	         */
	        getPreferredSize: function(fig) {
	            return new Dimension(this.getTextExtents(fig));
	        },
	        /**
	         * 得到文本颜色
	         * @type Color
	         */
	        getTextColor: function() {
	            return this.textColor;
	        },
	        /**
	         * 得到文本大小
	         * @type Dimension
	         */
	        getTextExtents: function(f) {
	            if (this.textExtents == null) {
	                this.textExtents = FigureUtilities.getTextExtents(this.label, this.getFont(f));
	            }
	            return this.textExtents;
	        },
	        /**
	         * 使边框无效
	         */
	        invalidate: function() {
	            this.insets = null;
	            this.textExtents = null;
	        },
	        /**
	         * 设置字体
	         * @param {String} font 新的字体
	         */
	        setFont: function(font) {
	            this.font = font;
	            this.invalidate();
	        },
	        /**
	         * 设置文本
	         * @param {String} s
	         */
	        setLabel: function(s) {
	            this.label = ((s == null) ? "" : s);
	            this.invalidate();
	        },
	        /**
	         * 设置文本颜色
	         * @param {Color} color 新的文本颜色
	         */
	        setTextColor: function(color) {
	            this.textColor = color;
	        }
	    });

	    return AbstractLabeledBorder;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 38 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(23),
	    __webpack_require__(13),
	    __webpack_require__(10)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractBorder, Insets, Dimension) {
	    'use strict';

	    var CompoundBorder = function(outer, inner) {
	        CompoundBorder.superclass.constructor.call(this);
	        this.inner = inner;
	        this.outer = outer;

	    };

	    //static properties
	    util.defineClass(CompoundBorder, AbstractBorder, {
	        /**
	         * 得到内部的边框
	         */
	        getInnerBorder: function() {
	            return this.inner;
	        },
	        /**
	         * 得到插入值
	         * @param {Figure} figure 需要绘制边框的图形
	         */
	        getInsets: function(figure) {
	            var insets = null;
	            if (this.inner != null) {
	                insets = this.inner.getInsets(figure);
	            } else {
	                insets = new Insets();
	            }
	            if (this.outer != null) {
	                var moreInsets = this.outer.getInsets(figure);
	                insets = insets.getAdded(moreInsets);
	            }
	            return insets;
	        },
	        getPreferredSize: function(fig) {
	            var prefSize = new Dimension(this.inner.getPreferredSize(fig));
	            var outerInsets = this.outer.getInsets(fig);
	            prefSize.expand(outerInsets.getWidth(), outerInsets.getHeight());
	            prefSize.union(this.outer.getPreferredSize(fig));
	            return prefSize;
	        },
	        /**
	         * 得到外部的边框
	         */
	        getOuterBorder: function() {
	            return this.outer;
	        },
	        isOpaque: function() {
	            return ((this.inner != null) ? this.inner.isOpaque() : false) && ((this.outer != null) ? this.outer.isOpaque() : false);
	        },

	        /**
	         * @param {Figure} figure 需要绘制边框的图形
	         * @param {Graphics} graphics 绘图类
	         * @param {Insets} insets 绘制边框时使用的插入值
	         */
	        paint: function(figure, graphics, insets) {
	            if (this.outer != null) {
	                graphics.saveState();
	                this.outer.paint(figure, graphics, insets);
	                graphics.restoreState();
	                insets = insets.getAdded(this.outer.getInsets(figure));
	            }
	            if (this.inner != null) {
	                this.inner.paint(figure, graphics, insets);
	            }
	        }
	    });

	    return CompoundBorder;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 39 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(23),
	    __webpack_require__(22),
	    __webpack_require__(13)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractBorder, ColorConstants, Insets) {
	    'use strict';

	    var FocusBorder = function() {
	        FocusBorder.superclass.constructor.call(this);

	    };

	    //static properties
	    util.defineClass(FocusBorder, AbstractBorder, {
	        getInsets: function(figure) {
	            return new Insets(1);
	        },
	        paint: function(figure, graphics, insets) {
	            AbstractBorder.tempRect.setBounds(this.getPaintRectangle(figure, insets));
	            AbstractBorder.tempRect.width--;
	            AbstractBorder.tempRect.height--;
	            graphics.setStrokeColor(ColorConstants.black);
	            graphics.setFillColor(ColorConstants.black);
	            graphics.drawFocus(AbstractBorder.tempRect); //TODO
	        },
	        isOpaque: function() {
	            return true;
	        }
	    });

	    return FocusBorder;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 40 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(23),
	    __webpack_require__(13)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractBorder, Insets) {
	    'use strict';

	    /**
	     * @class 线性边框
	     * @constructor
	     * @extends AbstractBorder
	     * @param {Number} width  边框的宽度
	     * @param {Color} color 边框的颜色
	     * @returns
	     */
	    //对于边框，可以考虑使用享元模式进行改进
	    var LineBorder = function(width, color) {
	        LineBorder.superclass.constructor.call(this);
	        this.width = 1;
	        this.setWidth(width);
	        this.setColor(color);

	    };

	    //static properties
	    util.defineClass(LineBorder, AbstractBorder, {
	        /**
	         * @type Color
	         */
	        getColor: function() {
	            return this.color;
	        },
	        /**
	         * @param {Figure} figure 需要绘制边框的图形
	         * @type Insets
	         */
	        getInsets: function(figure) {
	            return new Insets(this.getWidth());
	        },
	        /**
	         * @type Number
	         */
	        getWidth: function() {
	            return this.width;
	        },
	        /**
	         * 绘制边框
	         * @param {Figure} figure
	         * @param {Graphics} graphics
	         * @param {Insets} insets
	         */
	        paint: function(figure, graphics, insets) {
	            AbstractBorder.tempRect.setBounds(this.getPaintRectangle(figure, insets));
	            if (this.getWidth() % 2 == 1) {
	                AbstractBorder.tempRect.width--;
	                AbstractBorder.tempRect.height--;
	            }
	            AbstractBorder.tempRect.shrink(this.getWidth() / 2, this.getWidth() / 2);
	            graphics.setLineWidth(this.getWidth());
	            if (this.getColor() != null) {
	                graphics.setStrokeColor(this.getColor());
	            }
	            var temp = AbstractBorder.tempRect;
	            graphics.strokeRect(temp.x, temp.y, temp.width, temp.height);
	        },
	        /**
	         * 设置边框颜色
	         */
	        setColor: function(color) {
	            this.color = color;
	        },
	        /**
	         * 设置边框宽度
	         */
	        setWidth: function(width) {
	            if (width > 0) {
	                this.width = width;
	            }
	        },
	        isOpaque: function() {
	            return true;
	        }
	    });

	    return LineBorder;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 41 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(13),
	    __webpack_require__(23)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Insets, AbstractBorder) {
	    'use strict';

	    /**
	     * maginBorder只是用来占位，不会绘制任何东西
	     *
	     */
	    var MarginBorder = function(arg1, arg2, arg3, arg4) {
	        MarginBorder.superclass.constructor.call(this);
	        if (arg1 != null) {
	            if (util.isInstanceOf(arg1, Insets)) {
	                this.insets = arg1;
	            } else if (arg2 != null && arg3 != null && arg4 != null) {
	                this.insets = new Insets(arg1, arg2, arg3, arg4);
	            } else {
	                this.insets = new Insets(arg1);
	            }
	        }
	    };


	    //static properties
	    util.defineClass(MarginBorder, AbstractBorder, {
	        getInsets: function(figure) {
	            return this.insets;
	        },
	        paint: function(figure, graphics, insets) {}
	    });

	    return MarginBorder;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 42 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(13)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Insets) {
	    'use strict';

	    var Scheme = function(highlight, shadow) {
	        Scheme.superclass.constructor.call(this);
	        this.insets = null;
	        this.isOpaque = false;
	        this.highlight = highlight || [];
	        this.shadow = shadow || highlight || [];
	        this.initialize();

	    };


	    //static properties
	    util.defineClass(Scheme, Object, {
	        calculateInsets: function() {
	            var tl = this.highlight.length;
	            var br = this.shadow.length;
	            return new Insets(tl, tl, br, br);
	        },
	        calculateOpaque: function() {
	            var colors = this.highlight;
	            for (var i = 0; i < colors.length; i++) {
	                if (colors[i] == null) {
	                    return false;
	                }
	            }
	            colors = this.shadow;
	            for (i = 0; i < colors.length; i++) {
	                if (colors[i] == null) {
	                    return false;
	                }
	            }
	            return true;
	        },
	        initialize: function() {
	            this.insets = this.calculateInsets();
	            this.isOpaque = this.calculateOpaque();
	        }
	    });

	    return Scheme;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 43 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(22),
	    __webpack_require__(42),
	    __webpack_require__(23)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, ColorConstants, Scheme, AbstractBorder) {
	    'use strict';

	    var SchemeBorder = function(scheme) {
	        SchemeBorder.superclass.constructor.call(this);
	        this.scheme = scheme;
	    };

	    //static properties
	    SchemeBorder.DARKEST_DARKER = [ColorConstants.buttonDarkest, ColorConstants.buttonDarker];
	    SchemeBorder.LIGHTER_DARKER = [ColorConstants.buttonLightest, ColorConstants.buttonDarker];
	    SchemeBorder.DARKER_LIGHTER = [ColorConstants.buttonDarker, ColorConstants.buttonLightest];

	    SchemeBorder.SCHEMES = {
	        BUTTON_CONTRAST: new Scheme([ColorConstants.button, ColorConstants.buttonLightest], SchemeBorder.DARKEST_DARKER),
	        BUTTON_RAISED: new Scheme([ColorConstants.buttonLightest], SchemeBorder.DARKEST_DARKER),
	        BUTTON_PRESSED: new Scheme(SchemeBorder.DARKEST_DARKER, [ColorConstants.buttonLightest]),
	        RAISED: new Scheme([ColorConstants.buttonLightest], [ColorConstants.buttonDarkest]),
	        LOWERED: new Scheme([ColorConstants.buttonDarkest], [ColorConstants.buttonLightest]),
	        RIDGED: new Scheme(SchemeBorder.LIGHTER_DARKER, SchemeBorder.DARKER_LIGHTER),
	        ETCHED: new Scheme(SchemeBorder.DARKER_LIGHTER, SchemeBorder.LIGHTER_DARKER)
	    };

	    util.defineClass(SchemeBorder, AbstractBorder, {
	        getInsets: function(figure) {
	            return this.scheme.insets;
	        },
	        isOpaque: function() {
	            return true;
	        },
	        paint: function(figure, graphics, insets) {
	            this.internal_paint(graphics, figure, insets, this.scheme.highlight, this.scheme.shadow);
	        },
	        internal_paint: function(graphics, fig, insets, tl, br) {
	            graphics.setLineWidth(1);
	            //graphics.setLineStyle(Graphics.LINE_SOLID);
	            var rect = this.getPaintRectangle(fig, insets);

	            var top = rect.y;
	            var left = rect.x;
	            var bottom = rect.bottom() - 1;
	            var right = rect.right() - 1;
	            var color;
	            var i = 0;
	            graphics.beginPath();
	            for (; i < br.length; i++) {
	                color = br[i];
	                graphics.setStrokeColor(color);
	                graphics.moveTo(right - i, bottom - i);
	                graphics.lineTo(right - i, top + i);
	                graphics.moveTo(right - i, bottom - i);
	                graphics.lineTo(left + i, bottom - i);
	            }
	            graphics.stroke();
	            right--;
	            bottom--;
	            graphics.beginPath();
	            for (i = 0; i < tl.length; i++) {
	                color = tl[i];
	                graphics.setStrokeColor(color);
	                graphics.moveTo(left + i, top + i);
	                graphics.lineTo(right - i, top + i);
	                graphics.moveTo(left + i, top + i);
	                graphics.lineTo(left + i, bottom - i);
	            }
	            graphics.stroke();
	        }
	    });

	    return SchemeBorder;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 44 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(42),
	    __webpack_require__(13)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Scheme, Insets) {
	    'use strict';

	    var ButtonScheme = function(highlight, shadow, highlightPressed, shadowPressed) {
	        this.highlight = highlight;
	        this.shadow = shadow;
	        this.highlightPressed = highlightPressed || highlight;
	        this.shadowPressed = highlightPressed || shadow;
	        this.initialize();
	    };


	    //static properties
	    util.defineClass(ButtonScheme, Scheme, {
	        calculateInsets: function() {
	            var tl = Math.max(this.highlight.length, this.shadowPressed.length);
	            var br = 1 + Math.max(this.shadow.length,
	                this.highlightPressed.length);
	            return new Insets(tl, tl, br, br);
	        },
	        calculateOpaque: function() {
	            if (!ButtonScheme.superclass.calculateOpaque.call(this))
	                return false;
	            if (this.highlight.length != this.shadowPressed.length)
	                return false;
	            if (this.shadow.length != this.highlightPressed.length)
	                return false;
	            var colors = this.highlightPressed;
	            for (var i = 0; i < colors.length; i++) {
	                if (colors[i] == null) {
	                    return false;
	                }
	            }
	            colors = this.shadowPressed;
	            for (i = 0; i < colors.length; i++) {
	                if (colors[i] == null) {
	                    return false;
	                }
	            }
	            return true;
	        },
	        initialize: function() {
	            this.insets = this.calculateInsets();
	            this.isOpaque = this.calculateOpaque();
	        }
	    });

	    return ButtonScheme;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 45 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-10
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(22),
	    __webpack_require__(44),
	    __webpack_require__(43)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, ColorConstants, ButtonScheme, SchemeBorder) {
	    'use strict';

	    var ButtonBorder = function(scheme) {
	        ButtonBorder.superclass.constructor.call(this, scheme || ButtonBorder.SCHEMES.BUTTON);
	    };

	    //static properties
	    ButtonBorder.SCHEMES = {
	        BUTTON_CONTRAST: new ButtonScheme([ColorConstants.button, ColorConstants.buttonLightest], SchemeBorder.DARKEST_DARKER),
	        BUTTON: new ButtonScheme([ColorConstants.buttonLightest], SchemeBorder.DARKEST_DARKER),
	        TOOLBAR: new ButtonScheme([ColorConstants.buttonLightest], [ColorConstants.buttonDarker]),
	        BUTTON_SCROLLBAR: new ButtonScheme([ColorConstants.button, ColorConstants.buttonLightest], SchemeBorder.DARKEST_DARKER, [ColorConstants.buttonDarker], [ColorConstants.buttonDarker])
	    };

	    util.defineClass(ButtonBorder, SchemeBorder, {
	        paint: function(figure, graphics, insets) {
	            var clickable = figure;
	            var model = clickable.getModel();
	            var colorScheme = this.scheme;
	            if (clickable.isRolloverEnabled() && !model.isMouseOver() &&
	                !model.isSelected())
	                return;
	            var tl, br;
	            if (model.isSelected() || model.isArmed()) {
	                tl = colorScheme.shadowPressed;
	                br = colorScheme.highlightPressed;
	            } else {
	                tl = colorScheme.highlight;
	                br = colorScheme.shadow;
	            }
	            this.internal_paint(graphics, figure, insets, tl, br);
	        }
	    });

	    return ButtonBorder;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 46 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(10),
	    __webpack_require__(11),
	    __webpack_require__(25),
	    __webpack_require__(9),
	    __webpack_require__(12),
	    __webpack_require__(47)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    Dimension,
	    PositionConstants,
	    Figure,
	    Point,
	    Rectangle,
	    TextUtilities
	) {
	    'use strict';

	    /**
	     * 标签
	     * @extends Figure
	     * @class Label
	     * @constructor hh
	     * @param id
	     * @param text
	     * @param icon
	     * @return 一个新的标签对象
	     */
	    var Label = function(id, arg1, arg2) {
	        Label.superclass.constructor.call(this, id);
	        this.iconSize = new Dimension(0, 0);
	        this.textAlignment = PositionConstants.CENTER;
	        this.iconAlignment = PositionConstants.CENTER;
	        this.labelAlignment = PositionConstants.CENTER;
	        this.textPlacement = PositionConstants.EAST;
	        this.iconTextGap = 3;

	        if (typeof arg1 == "string" || arg1 instanceof String) {
	            this.setText(arg1);
	        } else if (arg1 instanceof Image) {
	            this.setIcon(arg1);
	        }

	        if (typeof arg2 == "string" || arg2 instanceof String) {
	            this.setText(arg2);
	        } else if (arg2 instanceof Image) {
	            this.setIcon(arg2);
	        }

	    };

	    //static properties

	    Label.ELLIPSIS = "...";

	    util.defineClass(Label, Figure, {
	        //在竖直方向上对齐
	        alignOnHeight: function(loc, size, alignment) {
	            var insets = this.getInsets();
	            switch (alignment) {
	                case PositionConstants.TOP:
	                    loc.y = insets.top;
	                    break;
	                case PositionConstants.BOTTOM:
	                    loc.y = this.getBounds().height - size.height - insets.bottom;
	                    break;
	                default:
	                    loc.y = (this.getBounds().height - size.height) / 2;
	            }
	        },

	        //在横向上对齐
	        alignOnWidth: function(loc, size, alignment) {
	            var insets = this.getInsets();
	            switch (alignment) {
	                case PositionConstants.LEFT:
	                    loc.x = insets.left;
	                    break;
	                case PositionConstants.RIGHT:
	                    loc.x = this.getBounds().width - size.width - insets.right;
	                    break;
	                default:
	                    loc.x = (this.getBounds().width - size.width) / 2;
	            }
	        },

	        calculateAlignment: function() {
	            switch (this.textPlacement) {
	                case PositionConstants.EAST:
	                case PositionConstants.WEST:
	                    this.alignOnHeight(this.textLocation, this.getTextSize(), this.textAlignment);
	                    this.alignOnHeight(this.iconLocation, this.getIconSize(), this.iconAlignment);
	                    break;
	                case PositionConstants.NORTH:
	                case PositionConstants.SOUTH:
	                    this.alignOnWidth(this.textLocation, this.getSubStringTextSize(), this.textAlignment);
	                    this.alignOnWidth(this.iconLocation, this.getIconSize(), this.iconAlignment);
	                    break;
	            }
	        },
	        clearLocation: function() {
	            this.iconLocation = null;
	            this.textLocation = null;
	        },
	        calculateLabelSize: function(textSize) {
	            //return new Dimension(200,100);
	            var gap = this.getIconTextGap();
	            if (this.icon == null || this.text == "") {
	                gap = 0;
	            }
	            var dimension = new Dimension(0, 0);
	            if (this.textPlacement == PositionConstants.WEST || this.textPlacement == PositionConstants.EAST) {
	                dimension.width = this.getIconSize().width + gap + textSize.width;
	                dimension.height = Math.max(this.getIconSize().height, textSize.height);
	            } else {
	                dimension.width = Math.max(this.getIconSize().width, textSize.width);
	                dimension.height = this.getIconSize().height + gap + textSize.height;
	            }
	            return dimension;
	        },
	        calculateLocations: function() {
	            this.textLocation = new Point();
	            this.iconLocation = new Point();

	            this.calculatePlacement();
	            this.calculateAlignment();
	            var offset = this.getSize().getDifference(this.getPreferredSize());
	            offset.width += this.getTextSize().width - this.getSubStringTextSize().width;

	            switch (this.labelAlignment) {
	                case PositionConstants.CENTER:
	                    offset.scale(0.5);
	                    break;
	                case PositionConstants.LEFT:
	                    offset.scale(0);
	                    break;
	                case PositionConstants.RIGHT:
	                    offset.scale(1);
	                    break;
	                case PositionConstants.TOP:
	                    offset.height = 0;
	                    offset.scale(0.5);
	                    break;
	                case PositionConstants.BOTTOM:
	                    offset.height = offset.height * 2;
	                    offset.scale(0.5);
	                    break;
	                default:
	                    offset.scale(0.5);
	                    break;
	            }
	            switch (this.textPlacement) {
	                case PositionConstants.EAST:
	                case PositionConstants.WEST:
	                    offset.height = 0;
	                    break;
	                case PositionConstants.NORTH:
	                case PositionConstants.SOUTH:
	                    offset.width = 0;
	                    break;
	            }

	            this.textLocation.translate(offset);
	            this.iconLocation.translate(offset);
	        },
	        calculatePlacement: function() {
	            var gap = this.getIconTextGap();
	            if (this.icon == null || this.text == "") {
	                gap = 0;
	            }
	            var insets = this.getInsets();
	            switch (this.textPlacement) {
	                case PositionConstants.EAST:
	                    this.iconLocation.x = insets.left;
	                    this.textLocation.x = this.getIconSize().width + gap + insets.left;
	                    break;
	                case PositionConstants.WEST:
	                    this.textLocation.x = insets.left;
	                    this.iconLocation.x = this.getSubStringTextSize().width + gap + insets.left;
	                    break;
	                case PositionConstants.NORTH:
	                    this.textLocation.y = insets.top;
	                    this.iconLocation.y = this.getTextSize().height + gap + insets.top;
	                    break;
	                case PositionConstants.SOUTH:
	                    this.textLocation.y = this.getIconSize().height + gap + insets.top;
	                    this.iconLocation.y = insets.top;
	                    break;
	            }
	        },
	        calculateSubStringTextSize: function() {
	            var text = this.getSubStringText();
	            if (text == null || text === '') {
	                return new Dimension(0, 0);
	            }
	            return this.getTextUtilities().getTextExtents(text, this.getFont());
	        },
	        calculateTextSize: function() {
	            var text = this.getText();
	            if (text == null || text === '') {
	                return new Dimension(0, 0);
	            }
	            return this.getTextUtilities().getTextExtents(this.getText(), this.getFont());
	        },
	        clearLocations: function() {
	            this.iconLocation = null;
	            this.textLocation = null;
	        },
	        /**
	         * 获取图片
	         * @returns 本标签的图片
	         * @type Image
	         */
	        getIcon: function() {
	            return this.icon;
	        },
	        //bounds是相对于Label的parent的，而iconLocation是相对于Label的.
	        getIconBounds: function() {
	            return new Rectangle(this.getBounds().getLocation().translate(this.getIconLocation()), this.getIconSize());
	        },
	        getIconLocation: function() {
	            if (this.iconLocation == null) {
	                this.calculateLocations();
	            }
	            return this.iconLocation;
	        },
	        getIconSize: function() {
	            if (this.iconSize == null) {
	                if (this.icon != null) {
	                    this.iconSize = new Dimension(this.icon.width, this.icon.height);
	                } else {
	                    return new Dimension(0, 0);
	                }

	            }
	            return this.iconSize;
	        },
	        /**
	         * 获取图片与文本之间的间隔
	         * @returns 图片与文本之间的间隔
	         * @type Number
	         */
	        getIconTextGap: function() {
	            return this.iconTextGap;
	        },
	        getMinimumSize: function(w, h) {
	            if (this.minSize) {
	                return this.minSize;
	            }
	            this.minSize = new Dimension();
	            if (this.layoutManager) {
	                this.minSize.setSize(this.layoutManager.getMinimumSize(this, w, h));
	            }

	            var labelSize = this.calculateLabelSize(this.getTextUtilities().getTextExtents(this.getTruncationString(), this.getFont()).intersect(this.getTextUtilities().getTextExtents(this.getText(), this.getFont())));
	            var insets = this.getInsets();
	            labelSize.expand(insets.getWidth(), insets.getHeight());
	            this.minSize.union(labelSize);
	            return this.minSize;
	        },
	        getPreferredSize: function(wHint, hHint) {
	            if (null == wHint && null == hHint) {
	                wHint = -1;
	                hHint = -1;
	            }
	            if (this.prefSize == null) {
	                this.prefSize = this.calculateLabelSize(this.getTextSize());
	                var insets = this.getInsets();
	                if (!insets.isEmpty()) {
	                    this.prefSize.expand(insets.getWidth(), insets.getHeight());
	                }
	                if (this.layoutManager) {
	                    this.prefSize.union(this.layoutManager.getPreferredSize(this, wHint, hHint));
	                }

	            }

	            if (wHint >= 0 && wHint < this.prefSize.width) {
	                var minSize = this.getMinimumSize(wHint, hHint);
	                var result = this.prefSize.getCopy();
	                result.width = Math.min(result.width, wHint);
	                result.width = Math.max(minSize.width, result.width);
	                return result;
	            }

	            return this.prefSize;
	        },
	        /**
	         * 获取子串
	         * @private
	         * @returns 子串
	         * @type String
	         */
	        getSubStringText: function() {
	            if (this.subStringText != null) {
	                return this.subStringText;
	            }
	            this.subStringText = this.text;
	            var widthShrink = this.getPreferredSize().width - this.getSize().width;
	            if (widthShrink <= 0) {
	                return this.subStringText;
	            }
	            var effectiveSize = this.getTextSize().getExpanded(-widthShrink, 0);
	            var currentFont = this.getFont();
	            var dotsWidth = this.getTextUtilities().getTextExtents(this.getTruncationString(), currentFont).width;
	            if (effectiveSize.width < dotsWidth) {
	                effectiveSize.width = dotsWidth;
	            }
	            var subStringLength = this.getTextUtilities().getLargestSubstringConfinedTo(this.text, currentFont, effectiveSize.width - dotsWidth);
	            this.subStringText = new String(this.text.substring(0, subStringLength) + this.getTruncationString());
	            return this.subStringText;
	        },
	        getSubStringTextSize: function() {
	            if (this.subStringTextSize == null) {
	                this.subStringTextSize = this.calculateSubStringTextSize();
	            }
	            return this.subStringTextSize;
	        },
	        /**
	         * 获取文本
	         * @returns 文本
	         * @type String
	         */
	        getText: function() {
	            return this.text;
	        },
	        getTextBounds: function() {
	            return new Rectangle(this.getBounds().getLocation().translate(this.getTextLocation()), this.textSize);
	        },
	        getTextLocation: function() {
	            if (this.textLocation != null) {
	                return this.textLocation;
	            }
	            this.calculateLocations();
	            return this.textLocation;
	        },
	        getTextSize: function() {
	            if (this.textSize != null) {
	                return this.textSize;
	            }
	            this.textSize = this.calculateTextSize();
	            return this.textSize;
	        },
	        getTextUtilities: function() {
	            return TextUtilities.INSTANCE;
	        },
	        getTruncationString: function() {
	            return Label.ELLIPSIS;
	        },
	        invalidate: function() {
	            this.prefSize = null;
	            this.minSize = null;
	            this.clearLocations();
	            this.textSize = null;
	            this.subStringTextSize = null;
	            this.subStringText = null;
	            //this.iconSize = null;
	            Label.superclass.invalidate.call(this);
	        },
	        isTextTruncated: function() {
	            return !this.getSubStringText().equals(this.getText());
	        },
	        paintFigure: function(graphics) {
	            if (this.isOpaque()) {
	                Label.superclass.paintFigure.call(this, graphics);
	            }
	            var bounds = this.getBounds();
	            graphics.translate(bounds.x, bounds.y);

	            if (this.icon) {
	                graphics.drawImage(this.icon, this.getIconLocation().x, this.getIconLocation().y);
	            }
	            if (!this.isEnabled()) {
	                graphics.translate(1, 1);
	                //graphics.setForegroundColor(ColorConstants.buttonLightest);

	                graphics.fillText(this.getSubStringText(), this.getTextLocation().x, this.getTextLocation().y);
	                graphics.translate(-1, -1);
	                //graphics.setForegroundColor(ColorConstants.buttonDarker);
	            }

	            graphics.fillText(this.getSubStringText(), this.getTextLocation().x, this.getTextLocation().y);
	            graphics.translate(-bounds.x, -bounds.y);

	        },
	        /**
	         * 图片加载成功
	         */
	        pictureLoaded: function() {
	            this.iconSize = null;
	            this.revalidate();
	            this.repaint();
	            //				var parent = this;
	            //				while(parent.parent != null){
	            //					parent = parent.parent;
	            //				}
	            //				if(parent.lws != null){
	            //					setTimeout(function(){parent.lws.performUpdate()}); //????ì???????
	            //parent.lws.performUpdate();
	            //				}
	        },
	        /**
	         * 为标签设置图片
	         * @param {Image} icon 标签需要显示的图片
	         */
	        setIcon: function(icon) {
	            if (icon == this.icon) {
	                return;
	            }
	            if (this.icon && this.icon.removeLoadListener) {
	                this.icon.removeLoadListener(this);
	            }
	            this.icon = icon;
	            icon.addLoadListener(this);
	            this.repaint();
	            if (this.icon == null) {
	                this.setIconDimension(new Dimension());
	            } else {
	                this.setIconDimension(new Dimension(icon.width, icon.height));
	            }
	        },
	        dispose: function() {
	            Label.superclass.dispose.call(this);
	            if (this.icon && this.icon.removeLoadListener) {
	                this.icon.removeLoadListener(this);
	            }
	            this.icon = null;
	        },
	        /**
	         * 为标签设置图片的对齐方式
	         * @param {Int} align 图片的对齐方式
	         */
	        setIconAlignment: function(align) {
	            if (this.iconAlignment == align) {
	                return;
	            }
	            this.iconAlignment = align;
	            this.clearLocations();
	            this.repaint();
	        },
	        /**
	         * 为标签设置图片的大小
	         * @param {Dimension} d 图片的大小
	         */
	        setIconDimension: function(d) {
	            if (d.equals(this.iconSize)) {
	                return;
	            }
	            this.iconSize = d;
	            this.revalidate();
	        },
	        /**
	         * 设置图片与文本的间隔
	         * @param {Number} gap 图片与文本的间隔
	         */
	        setIconTextGap: function(gap) {
	            if (this.iconTextGap == gap) {
	                return;
	            }
	            this.iconTextGap = gap;
	            this.repaint();
	            this.revalidate();
	        },
	        /**
	         * 设置标签的对齐方式
	         * @param {Int} align 标签的对齐方式
	         */
	        setLabelAlignment: function(align) {
	            if (this.labelAlignment == align) {
	                return;
	            }
	            this.labelAlignment = align;
	            this.clearLocation();
	            this.repaint();
	        },
	        /**
	         * 设置标签显示的文本
	         * @param {String} string 标签显示的文本
	         */
	        setText: function(string) {
	            if (string == null) {
	                string = "";
	            }
	            if (string == this.text) {
	                return;
	            }
	            this.text = string;
	            this.revalidate();
	            this.repaint();
	        },
	        /**
	         * 设置文本的对齐方式
	         * @param {Int} align 设置文本的对齐方式
	         */
	        setTextAlignment: function(align) {
	            if (this.textAlignment == align) {
	                return;
	            }
	            this.textAlignment = align;
	            this.clearLocation();
	            this.repaint();
	        },
	        /**
	         * 设置文本的位置
	         * @param {Int} where 设置文本的位置
	         */
	        setTextPlacement: function(where) {
	            if (this.textPlacement == where) {
	                return;
	            }
	            this.textPlacement = where;
	            this.revalidate();
	            this.repaint();
	        }
	    });

	    return Label;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 47 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(19)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, FigureUtilities) {
	    'use strict';

	    /**
	     * @class 文本工具类
	     * @constructor
	     * @returns
	     */
	    var TextUtilities = function() {
	        TextUtilities.superclass.constructor.call(this);

	    };


	    util.defineClass(TextUtilities, Object, {
	        /**
	         * 得到文本大小
	         * @param {String} s 文本
	         * @param {String} f 字体
	         * @returns 文本的大小
	         * @type Dimension
	         */
	        getTextExtents: function(s, f) {
	            var extents = FigureUtilities.getTextExtents(s, f);

	            if (extents.height == null) {
	                var fontSize = this.getFontSize(f);
	                extents.height = fontSize;
	            }

	            return extents;
	        },

	        getAscent: function(font) {
	            Debugger.log("TextUtilities -getAscent- TODO");
	            //var fm = FigureUtilities.getFontMetrics(font);
	            //return fm.getHeight() - fm.getDescent();
	        },
	        /**
	         * 得到平均字符宽度
	         * @param {String} f 字体
	         * @returns 平均字符宽度
	         * @type Number
	         */
	        getAverageCharWidth: function(f) {
	            var s = "text";
	            var width = this.getTextExtents(s, f).width;
	            return width / 4;
	        },
	        getDescent: function(font) {
	            Debugger.log("TextUtilities -getDescent- TODO");
	            //return FigureUtilities.getFontMetrics(font).getDescent();
	        },
	        getFontSize: function(font) {
	            if (font == null) {
	                font = "12px sans-serif";
	            }
	            var sizeString = new String(new RegExp("(?:\\d+|\\d+\\.\\d+)px").exec(font));
	            var size = new Number(sizeString.substring(0, sizeString.length - 2));
	            return size;
	        },
	        /**
	         * 得到在有限宽度下的最长子串
	         * @param {String} s 原始字符串
	         * @param {String} f 字体
	         * @param {Number} availableWidth 可用宽度
	         * @returns 可用的最长子串
	         * @type String
	         */
	        getLargestSubstringConfinedTo: function(s, f, availableWidth) {
	            var string = new String(s);
	            var metrics = FigureUtilities.getFontMetrics(f);
	            var min;
	            var max;
	            var avg = this.getAverageCharWidth(f);
	            min = 0;
	            max = string.length + 1;

	            var guess = 0;
	            var guessSize = 0;
	            while ((max - min) > 1) {
	                guess = guess + Math.floor((availableWidth - guessSize) / avg);
	                if (guess >= max) {
	                    guess = max - 1;
	                }
	                if (guess <= min) {
	                    guess = min + 1;
	                }
	                guessSize = this.getTextExtents(string.substring(0, guess), f).width;
	                if (guessSize < availableWidth) {
	                    min = guess;
	                } else {
	                    max = guess;
	                }
	            }
	            return min;
	        }
	    });
	    //static properties
	    TextUtilities.INSTANCE = new TextUtilities();

	    return TextUtilities;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 48 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    /**
	     * Panel，不透明的Figure
	     * @extends Figure
	     * @class Panel
	     * @constructor
	     * @return 一个新的Panel对象
	     */
	    var Panel = function(id) {
	        Panel.superclass.constructor.call(this, id);
	    };

	    //static properties
	    util.defineClass(Panel, Panel, {
	        isOpaque: function() {
	            return true;
	        }
	    });

	    return Panel;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 49 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(50),
	    __webpack_require__(21),
	    __webpack_require__(25)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, LineAttributes, Color, Figure) {
	    'use strict';

	    /**
	     * 形状
	     * @extends Figure
	     * @class 形状
	     * @constructor
	     * @return 一个新的Panel对象
	     */
	    var Shape = function(id) {
	        Shape.superclass.constructor.call(this, id);
	        this.lineAttributes = new LineAttributes();
	        this.fillColor = new Color();
	        this.fill = true;
	        this.outline = true;
	        this.lineWidth = this.lineAttributes.lineWidth;
	        this.lastLineWidth = this.lineWidth;
	        //line Width 和 lastLineWidth 有什么用处？不是已经有了lineAttribute.lineWidth了么？
	    };


	    //static properties
	    util.defineClass(Shape, Figure, {
	        /**
	         * 得到线宽
	         * @returns 线宽
	         * @type Number
	         */
	        getLineWidth: function() {
	            return this.lineWidth;
	        },
	        outlineShape: function(graphics) {
	            Debugger.error("please implement the function outlineShape()");
	        },
	        paintFill: function(graphics) {
	            graphics.setFillColor(this.fillColor);
	            graphics.fill();
	        },
	        paintFigure: function(graphics) {
	            graphics.beginPath();
	            if (!this.isEnabled()) {
	                graphics.translate(1, 1);
	                //graphics.setBackgroundColor(ColorConstants.buttonLightest);
	                //graphics.setForegroundColor(ColorConstants.buttonLightest);
	                this.outlineShape(graphics);
	                if (this.fill) {
	                    this.paintFill(graphics);
	                }
	                if (this.outline) {
	                    this.paintOutline(graphics);
	                }
	                //graphics.setBackgroundColor(ColorConstants.buttonDarker);
	                //graphics.setForegroundColor(ColorConstants.buttonDarker);
	                graphics.translate(-1, -1);
	            }
	            this.outlineShape(graphics);
	            if (this.fill) {
	                this.paintFill(graphics);
	            }
	            if (this.outline) {
	                this.paintOutline(graphics);
	            }
	        },
	        paintOutline: function(graphics) {
	            graphics.setLineAttributes(this.lineAttributes);
	            graphics.stroke();
	        },

	        /**
	         * 设置线条属性
	         * @param {LineAttributes} lineAttributes 线条的属性
	         */
	        setLineAttributes: function(lineAttributes) {
	            if (!this.lineAttributes.equals(lineAttributes)) {
	                this.lineAttributes = lineAttributes;
	                this.repaint();
	            }
	        },
	        /**
	         * 设置填充颜色
	         * @param {Color} color 填充颜色
	         */
	        setFillColor: function(color) {
	            if (color != null && !(color.equals(this.fillColor))) {
	                this.fillColor = color;
	                this.repaint();
	            }

	        },
	        /**
	         * 设置轮廓颜色
	         * @param {Color} color 轮廓颜色
	         */
	        setOutlineColor: function(color) {
	            if (this.lineAttributes != null) {
	                if (this.lineAttributes.lineColor != null && !(this.lineAttributes.lineColor.equals(color))) {
	                    this.lineAttributes.lineColor = color;
	                }
	                this.repaint();
	            }

	        },
	        /**
	         * 设置是否填充
	         * @param {boolean} fill 是否填充
	         */
	        setFill: function(fill) {
	            if (this.fill != fill) {
	                this.fill = fill;
	                this.repaint();
	            }
	        },
	        /**
	         * 设置是否显示轮廓
	         * @param {boolean} outline 是否显示轮廓
	         */
	        setOutline: function(outline) {
	            if (this.outline != outline) {
	                this.outline = outline;
	                this.repaint();
	            }
	        },
	        /**
	         * 设置线条宽度
	         * @param {Number} lineWidth 新的线条宽度
	         */
	        setLineWidth: function(lineWidth) {
	            if (this.lineAttributes.lineWidth != lineWidth) {
	                this.lastLineWidth = lineWidth;
	                this.lineWidth = lineWidth;
	                this.lineAttributes.lineWidth = lineWidth;
	                this.repaint();
	            }
	        }
	    });

	    return Shape;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 50 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(21)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Color) {
	    'use strict';

	    /**
	     *
	     * @class 线条属性
	     * @constructor
	     * @param {Number} width
	     * @param {Number} miterLimit
	     * @param {Number} cap
	     * @param {Number} join
	     * @param {Number} color
	     * @returns
	     */
	    var LineAttributes = function(width, miterLimit, cap, join, color) {
	        LineAttributes.superclass.constructor.call(this);
	        /**
	         * @field
	         * @type Number
	         */
	        this.lineWidth = 1; //(default 1)
	        /**
	         * @field
	         * @type Number
	         */
	        this.miterLimit = 10; //// (default 10)
	        /**
	         * @field
	         * @type String
	         */
	        this.lineCap = "butt"; // "butt", "round", "square" (default "butt")
	        /**
	         * @field
	         * @type String
	         */
	        this.lineJoin = "miter"; //"miter", "round", "bevel" (default "miter")
	        /**
	         * @field
	         * @type Color
	         */
	        this.lineColor = new Color(0, 0, 0);
	        if (width != null && width > 0) {
	            this.lineWidth = width;
	        }
	        if (miterLimit != null && miterLimit > 0) {
	            this.miterLimit = this.miterLimit;
	        }
	        if (cap != null) {
	            this.lineCap = cap;
	        }
	        if (join != null) {
	            this.lineJoin = join;
	        }
	        if (color != null) {
	            this.lineColor = color;
	        }

	    };

	    util.defineClass(LineAttributes, Object, {});

	    return LineAttributes;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 51 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(49)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Shape) {
	    'use strict';

	    /**
	     * 椭圆
	     * @extends Shape
	     * @class 椭圆
	     * @constructor
	     * @return 一个新的椭圆
	     */
	    var Ellipse = function(id) {
	        Ellipse.superclass.constructor.call(this, id);

	    };

	    //static properties
	    util.defineClass(Ellipse, Shape, {
	        containsPoint: function(x, y) {
	            if (!Ellipse.superclass.containsPoint.call(this, x, y)) {
	                return false;
	            } else {
	                var r = this.getBounds();
	                var ux = x - r.x - r.width / 2;
	                var uy = y - r.y - r.height / 2;
	                return ((ux * ux) << 10) / (r.width * r.width) + ((uy * uy) << 10) / (r.height * r.height) <= 256;
	            }
	        },
	        outlineShape: function(graphics) {
	            graphics.beginPath();
	            var bounds = this.getBounds();
	            graphics.ellipse(bounds.x + bounds.width / 2,
	                (bounds.y + bounds.height / 2), bounds.width / 2 - 1,
	                bounds.height / 2 - 1, 0, 360, true);

	        }
	    });

	    return Ellipse;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 52 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(16),
	    __webpack_require__(49)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, PointList, Shape) {
	    'use strict';

	    /**
	     * 抽象的多点图形
	     * @extends Shape
	     * @class 抽象的多点图形
	     * @constructor
	     * @return 一个新的抽象的多点图形
	     */
	    var AbstractPointListShape = function(id) {
	        AbstractPointListShape.superclass.constructor.call(this, id);
	        this.points = new PointList();

	    };


	    //static properties
	    util.defineClass(AbstractPointListShape, Shape, {

	        containsPoint: function(x, y) {
	            if (!AbstractPointListShape.superclass.containsPoint.call(this, x, y)) {
	                return false;
	            }
	            return this.shapeContainsPoint(x, y) || this.childrenContainsPoint(x, y);
	        },
	        childrenContainsPoint: function(x, y) {
	            for (var i = 0; i < this.children.length; i++) {
	                if (this.children[i].containsPoint(x, y)) return true;
	            }
	            return false;
	        },
	        shapeContainsPoint: function() {
	            //abstract
	        },
	        /**
	         * 增加一个点
	         * @param {Point} pt 新增加的点
	         */
	        addPoint: function(pt) {
	            this.erase();
	            this.points.addPoint(pt);
	            this.repaint();
	        },
	        /**
	         * 得到起始点
	         * @returns 起始点
	         * @type Point
	         */
	        getStart: function() {
	            return this.points.getFirstPoint();
	        },
	        /**
	         * 得到终点
	         * @returns 终点
	         * @type Point
	         */
	        getEnd: function() {
	            return this.points.getLastPoint();
	        },
	        /**
	         * 得到所有的点
	         * @returns 所有的点
	         * @type PointList
	         */
	        getPoints: function() {
	            return this.points;
	        },
	        /**
	         * 插入一个点
	         * @param {Point} pt 待插入的点
	         * @param {Int} index 插入位置
	         */
	        insertPoint: function(pt, index) {
	            this.erase();
	            this.points.insertPoint(pt, index);
	            this.repaint();
	        },
	        /**
	         * 移除所有的点
	         */
	        removeAllPoints: function() {
	            this.erase();
	            this.points.removeAllPoints();
	        },
	        /**
	         * 移除某一个点
	         * @param {Int} index 待移除的点位置
	         */
	        removePoint: function(index) {
	            this.erase();
	            this.points.removePoint(index);
	            this.repaint();
	        },
	        /**
	         * 设置起点
	         * @param {Point} pt 新的起点
	         */
	        setStart: function(start) {
	            if (this.points.size == 0) {
	                this.addPoint(start);
	            } else {
	                this.setPoint(start, 0);
	            }
	        },
	        /**
	         * 设置终点
	         * @param {Point} pt 新的终点
	         */
	        setEnd: function(end) {
	            if (this.points.size < 2) {
	                this.addPoint(end);
	            } else {
	                this.setPoint(end, this.points.size - 1);
	            }
	        },
	        /**
	         * 设置起点和终点
	         * @param {Point} start 新的起点
	         * @param {Point} end 新的终点
	         */
	        setEndpoints: function(start, end) {
	            this.setStart(start);
	            this.setEnd(end);
	        },
	        /**
	         * 设置点
	         * @param {Point} pt 新的点
	         * @param {Int} index 待设置点的位置
	         */
	        setPoint: function(pt, index) {
	            this.erase();
	            this.points.setPoint(pt, index);
	            this.repaint();
	        },
	        /**
	         * 设置所有的点
	         * @param {Points} pt 新的点
	         * @param {Int} index 待设置点的位置
	         */
	        setPoints: function(points) {
	            this.erase();
	            this.points = points;
	            this.repaint();
	        }
	    });

	    return AbstractPointListShape;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 53 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(49)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Shape) {
	    'use strict';

	    /**
	     * 矩形图形
	     * @extends Shape
	     * @class 矩形图形
	     * @constructor
	     * @return 一个新的矩形图形
	     */
	    var RectangleFigure = function(id) {
	        RectangleFigure.superclass.constructor.call(this, id);
	    };


	    //static properties
	    util.defineClass(RectangleFigure, Shape, {
	        outlineShape: function(graphics) {
	            var lineInset = Math.max(1, this.getLineWidth()) / 2;
	            var inset1 = Math.floor(lineInset);
	            var inset2 = Math.ceil(lineInset);
	            var x = this.getBounds().x + inset1;
	            var y = this.getBounds().y + inset2;
	            var width = this.getBounds().width - (inset1 + inset2);
	            var height = this.getBounds().height - (inset1 + inset2);
	            graphics.rect(x, y, width, height);
	        }
	    });

	    return RectangleFigure;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 54 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(10),
	    __webpack_require__(49)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Dimension, Shape) {
	    'use strict';

	    /**
	     * 圆角矩形
	     * @extends Shape
	     * @class 圆角矩形
	     * @constructor
	     * @return 一个新的圆角矩形
	     */
	    var RoundedRectangle = function(id) {
	        RoundedRectangle.superclass.constructor.call(this, id);
	        this.corner = new Dimension(18, 18);
	    };

	    //static properties
	    util.defineClass(RoundedRectangle, Shape, {
	        outlineShape: function(graphics) {
	            var lineInset = Math.max(1, this.getLineWidth()) / 2;
	            var inset1 = Math.floor(lineInset);
	            var inset2 = Math.ceil(lineInset);
	            var x = this.getBounds().x + inset1;
	            var y = this.getBounds().y + inset2;
	            var width = this.getBounds().width - (inset1 + inset2);
	            var height = this.getBounds().height - (inset1 + inset2);
	            graphics.roundRect(x, y, width, height, this.corner.width, this.corner.height);
	        },
	        /**
	         * 设置圆角的大小
	         * @param {Demension} d 圆角的大小
	         */
	        setCornerDimensions: function(d) {
	            this.corner.width = d.width;
	            this.corner.height = d.height;
	        }
	    });

	    return RoundedRectangle;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 55 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(11),
	    __webpack_require__(16),
	    __webpack_require__(12),
	    __webpack_require__(49),
	    __webpack_require__(9)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, PositionConstants, PointList, Rectangle, Shape, Point) {
	    'use strict';

	    /**
	     * 三角形
	     * @extends Shape
	     * @class 三角形
	     * @constructor
	     * @return 一个新的三角形
	     */
	    var Triangle = function() {
	        Triangle.superclass.constructor.call(this);
	        this.direction = PositionConstants.NORTH;
	        //this.direction = PositionConstants.EAST;
	        //orientation的用处不明
	        this.orientation = PositionConstants.VERTICAL;
	        //this.orientation = PositionConstants.HORIZONTAL;
	        this.triangle = new PointList();

	    };

	    //static properties
	    util.defineClass(Triangle, Shape, {
	        outlineShape: function(graphics) {
	            graphics.polygon(this.triangle);
	        },
	        primTranslate: function(dx, dy) {
	            Triangle.superclass.primTranslate.call(this, dx, dy);
	            this.triangle.translate(dx, dy);
	        },
	        setDirection: function(value) {
	            if (value == null) {
	                return;
	            }
	            //var PositionConstants = PositionConstants;
	            if ((value & (PositionConstants.NORTH | PositionConstants.SOUTH)) != 0) {
	                this.orientation = PositionConstants.VERTICAL;
	            } else {
	                this.orientation = PositionConstants.HORIZONTAL;
	            }
	            this.direction = value;
	            this.revalidate();
	            this.repaint();
	        },
	        setOrientation: function(value) {
	            if (this.orientation == PositionConstants.VERTICAL && value == PositionConstants.HORIZONTAL) {
	                if (this.direction == PositionConstants.NORTH) {
	                    this.setDirection(PositionConstants.WEST);
	                } else {
	                    this.setDirection(PositionConstants.EAST);
	                }
	                if (this.orientation == PositionConstants.HORIZONTAL && value == PositionConstants.VERTICAL) {
	                    if (this.direction == PositionConstants.WEST) {
	                        this.setDirection(PositionConstants.NORTH);
	                    } else {
	                        this.setDirection(PositionConstants.SOUTH);
	                    }
	                }
	            }
	        },
	        validate: function() {
	            Triangle.superclass.validate.call(this);
	            var r = new Rectangle(0, 0, 0, 0);
	            r.setBounds(this.getBounds());
	            r.crop(this.getInsets());
	            r.resize(-1, -1);
	            var size = 0;
	            //var PositionConstants = PositionConstants;
	            switch (this.direction & (PositionConstants.NORTH | PositionConstants.SOUTH)) {
	                case 0: //East or west.
	                    size = Math.min(r.height / 2, r.width);
	                    r.x += (r.width - size) / 2;
	                    break;
	                default: //North or south
	                    size = Math.min(r.height, r.width / 2);
	                    r.y += (r.height - size) / 2;
	                    break;
	            }
	            size = Math.max(size, 1); //Size cannot be negative
	            var head, p2, p3;
	            switch (this.direction) {
	                case PositionConstants.NORTH:
	                    head = new Point(r.x + r.width / 2, r.y);
	                    p2 = new Point(head.x - size, head.y + size);
	                    p3 = new Point(head.x + size, head.y + size);
	                    break;
	                case PositionConstants.SOUTH:
	                    head = new Point(r.x + r.width / 2, r.y + size);
	                    p2 = new Point(head.x - size, head.y - size);
	                    p3 = new Point(head.x + size, head.y - size);
	                    break;
	                case PositionConstants.WEST:
	                    head = new Point(r.x, r.y + r.height / 2);
	                    p2 = new Point(head.x + size, head.y - size);
	                    p3 = new Point(head.x + size, head.y + size);
	                    break;
	                default:
	                    head = new Point(r.x + size, r.y + r.height / 2);
	                    p2 = new Point(head.x - size, head.y - size);
	                    p3 = new Point(head.x - size, head.y + size);
	            }
	            this.triangle.removeAllPoints();
	            this.triangle.addPoint(head);
	            this.triangle.addPoint(p2);
	            this.triangle.addPoint(p3);
	        }
	    });

	    return Triangle;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 56 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(52),
	    __webpack_require__(15)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractPointListShape, Geometry) {
	    'use strict';

	    //polygonShape的每个点的位置都是相对位置，可以将整个shape作为一个整体，然后进行布局
	    /**
	     * 多边形形状
	     * @extends AbstractPointListShape
	     * @class 多边形形状
	     * @constructor
	     * @return 一个新的多边形形状
	     */
	    var PolygonShape = function(id) {
	        PolygonShape.superclass.constructor.call(this, id);

	    };

	    //static properties
	    util.defineClass(PolygonShape, AbstractPointListShape, {
	        shapeContainsPoint: function(x, y) {
	            var location = this.getLocation();
	            return Geometry.polygonContainsPoint(this.points, x - location.x, y - location.y);
	        },
	        outlineShape: function(graphics) {
	            var location = this.getLocation();
	            graphics.pushState();
	            graphics.translate(location.x, location.y);
	            graphics.polygon(this.points);
	            graphics.restoreState();
	        }
	    });

	    return PolygonShape;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 57 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(12),
	    __webpack_require__(52),
	    __webpack_require__(15),
	    __webpack_require__(58)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Rectangle, AbstractPointListShape, Geometry, Connection) {
	    'use strict';

	    /**
	     * 折线
	     * @extends AbstractPointListShape
	     * @class 折线
	     * @constructor
	     * @return 一个新的折线
	     */
	    var Polyline = function(id) {
	        Polyline.superclass.constructor.call(this, id);
	        this.tolerance = 2;
	        this.setFill(false);
	        this.bounds = null;
	    };

	    //static properties

	    Polyline.LINEBOUNDS = Rectangle.SINGLETON;

	    util.defineClass(Polyline, AbstractPointListShape, {
	        containsPoint: function(x, y) {
	            var tolerance = Math.max(this.getLineWidth() / 2, this.tolerance);
	            Polyline.LINEBOUNDS.setBounds(this.getBounds());
	            Polyline.LINEBOUNDS.expand(tolerance, tolerance);
	            if (!Polyline.LINEBOUNDS.contains(x, y)) {
	                return false;
	            }
	            return this.shapeContainsPoint(x, y) || this.childrenContainsPoint(x, y);
	        },
	        shapeContainsPoint: function(x, y) {
	            return Geometry.polylineContainsPoint(this.points, x, y, this.tolerance);
	        },
	        getBounds: function() {

	            if (this.bounds == null) {
	                var expand = this.getLineWidth() / 2.0;
	                this.bounds = this.getPoints().getBounds();
	                if (this.bounds != null) {
	                    this.bounds = this.bounds.getExpanded(expand, expand);
	                    /*
	                    取整运算，避免canvas的clearRect和Rect引起的问题。问题如下：
	                    如果context.fillRect(0,0,50,50);context.clearRect(5.5,5.5,10,10);
	                    在利用context.fillRect(5.5,5.5,10,10)去填充,理论上可以完全恢复，但实际情况是会在一周留下薄薄的一圈细缝。
	                    而我们用的是context.fillRect(0,0,50,50);context.clearRect(5.5,5.5,10,10);
	                    context.rect(5.5,5.5,10,10);context.clip();context.fillRect(0,0,50,50);则会在左面和上面留下细缝。
	                    总的来说就是canvas在clearRect和Rect时对于小数部分的取舍不同。
	                    */
	                    this.bounds.x = this.bounds.x >> 0;
	                    this.bounds.y = this.bounds.y >> 0;
	                }
	            }

	            return this.bounds;
	        },
	        isOpaque: function() {
	            return false;
	        },
	        outlineShape: function(graphics) {

	            graphics.polyline(this.points);
	        },
	        //此方法为空，覆盖掉祖先类Figure的相同方法，使得折线的位置不因布局而改变，只由其每个折点来决定，且为绝对位置。
	        primTranslate: function() {},
	        removeAllPoints: function() {
	            Polyline.superclass.removeAllPoints.call(this);
	            this.bounds = null;
	        },
	        setLineWidth: function(w) {
	            if (this.getLineWidth() == w) {
	                return;
	            }
	            if (w < this.getLineWidth()) {
	                this.erase();
	            }
	            this.bounds = null;
	            Polyline.superclass.setLineWidth.call(this, w);
	        },
	        setPoints: function(points) {
	            Polyline.superclass.setPoints.call(this, points);
	            this.firePropertyChange(Connection.PROPERTY_POINTS, null, points);
	        },
	        /**
	         * 设置在判断一个点是否在此Figure中时允许的误差范围
	         * @param {Number} tolerance 允许的误差范围
	         */
	        setTolerance: function(tolerance) {
	            this.tolerance = tolerance;
	        },
	        repaint: function() {
	            this.bounds = null;
	            Polyline.superclass.repaint.call(this);
	        }
	    });

	    return Polyline;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 58 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require) {
	    'use strict';

	    /**
	     * Connection
	     * 保存连接线需要用到的一些属性常量
	     */
	    var Connection = {};

	    Connection.PROPERTY_CONNECTION_ROUTER = "connectionRouter";
	    Connection.PROPERTY_POINTS = "points";

	    return Connection;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 59 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(15),
	    __webpack_require__(3),
	    __webpack_require__(57)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, Geometry, util, Polyline) {
	    'use strict';

	    //polygon的每个点的位置都是绝对位置，布局对其无效
	    /**
	     * 多边形
	     * @extends Polyline
	     * @class 多边形
	     * @constructor
	     * @return 一个新的多边形
	     */
	    var Polygon = function(id) {
	        Polygon.superclass.constructor.call(this, id);
	    };


	    util.defineClass(Polygon, Polyline, {
	        containsPoint: function(x, y) {
	            if (!this.getBounds().contains(x, y)) {
	                return false;
	            }
	            return this.shapeContainsPoint(x, y) || this.childrenContainsPoint(x, y);
	        },
	        shapeContainsPoint: function(x, y) {
	            return Geometry.polygonContainsPoint(this.points, x, y);
	        },
	        outlineShape: function(graphics) {
	            graphics.polygon(this.getPoints());
	        }

	    });

	    return Polygon;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 60 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(52),
	    __webpack_require__(15)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractPointListShape, Geometry) {
	    'use strict';

	    var PolylineShape = function(id) {
	        PolylineShape.superclass.constructor.call(this, id);
	        this.tolerance = 2;
	    };


	    util.defineClass(PolylineShape, AbstractPointListShape, {
	        shapeContainsPoint: function(x, y) {
	            var location = this.getLocation();
	            return Geometry.polylineContainsPoint(this.points, x - location.x, y - location.y, this.tolerance);
	        },
	        outlineShape: function(graphics) {
	            graphics.pushState();
	            graphics.translate(this.getLocation());
	            graphics.polyline(this.points);
	            graphics.restoreState();
	        },
	        setTolerance: function(tolerance) {
	            this.tolerance = tolerance;
	        }
	    });

	    return PolylineShape;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 61 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(12),
	    __webpack_require__(52),
	    __webpack_require__(15),
	    __webpack_require__(16)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    Rectangle,
	    AbstractPointListShape,
	    Geometry,
	    PointList
	) {
	    'use strict';

	    var ScalablePolygonShape = function(id) {
	        ScalablePolygonShape.superclass.constructor.call(this, id);
	        this.scaledPoints = null;
	    };

	    //static properties
	    ScalablePolygonShape.TEMPLATEBOUNDS = Rectangle.SINGLETON;

	    util.defineClass(ScalablePolygonShape, AbstractPointListShape, {
	        shapeContainsPoint: function(x, y) {
	            var location = this.getLocation();
	            return Geometry.polygonContainsPoint(this.getScaledPoints(), x - location.x, y - location.y);
	        },
	        outlineShape: function(graphics) {
	            graphics.pushState();
	            graphics.translate(this.getLocation());
	            graphics.polygon(this.getScaledPoints());
	            graphics.restoreState();
	        },
	        getTemplateBounds: function() {
	            ScalablePolygonShape.TEMPLATEBOUNDS.setLocation(0, 0);
	            ScalablePolygonShape.TEMPLATEBOUNDS.setSize(0, 0);
	            var intArray = this.points.toIntArray();
	            for (var i = 0; i < intArray.length;) {
	                var x = intArray[i++];
	                if (x > ScalablePolygonShape.TEMPLATEBOUNDS.width) {
	                    ScalablePolygonShape.TEMPLATEBOUNDS.width = x;
	                }
	                var y = intArray[i++];
	                if (y > ScalablePolygonShape.TEMPLATEBOUNDS.height) {
	                    ScalablePolygonShape.TEMPLATEBOUNDS.height = y;
	                }
	            }
	            return ScalablePolygonShape.TEMPLATEBOUNDS;

	        },
	        getScaledPoints: function() {
	            if (this.scaledPoints != null) {
	                return this.scaledPoints;
	            }
	            var pointsBounds = this.getTemplateBounds();
	            var actualBounds = this.getBounds();
	            var xScale = actualBounds.width > this.lineWidth ? (actualBounds.width - this.lineWidth) / pointsBounds.width : 0;
	            var yScale = actualBounds.height > this.lineWidth ? (actualBounds.height - this.lineWidth) / pointsBounds.height : 0;
	            var halfLineWidth = (this.lineWidth) / 2;
	            this.scaledPoints = new PointList(this.points);
	            var intArray = this.scaledPoints.toIntArray();
	            for (var i = 0; i < intArray.length; i += 2) {
	                intArray[i] = Math.floor(intArray[i] * xScale) + halfLineWidth;
	                intArray[i + 1] = Math.floor(intArray[i + 1] * yScale) + halfLineWidth;
	            }
	            return this.scaledPoints;
	        },
	        addPoint: function(pt) {
	            this.scaledPoints = null;
	            ScalablePolygonShape.superclass.addPoint.call(this, pt);
	        },
	        insertPoint: function(pt, index) {
	            this.scaledPoints = null;
	            ScalablePolygonShape.superclass.insertPoint.call(this, pt, index);
	        },
	        removeAllPoints: function() {
	            this.scaledPoints = null;
	            ScalablePolygonShape.superclass.removeAllPoints.call(this);
	        },
	        removePoint: function(index) {
	            this.scaledPoints = null;
	            ScalablePolygonShape.superclass.removePoint.call(this, index);
	        },
	        setStart: function(start) {
	            this.scaledPoints = null;
	            ScalablePolygonShape.superclass.setStart.call(this, start);
	        },
	        setEnd: function(end) {
	            this.scaledPoints = null;
	            ScalablePolygonShape.superclass.setEnd.call(this, end);
	        },
	        setPoint: function(pt, index) {
	            this.scaledPoints = null;
	            ScalablePolygonShape.superclass.setPoint.call(this, pt, index);
	        },
	        setPoints: function(points) {
	            this.scaledPoints = null;
	            ScalablePolygonShape.superclass.setPoints.call(this, points);
	        },
	        setBounds: function(rect) {
	            this.scaledPoints = null;
	            ScalablePolygonShape.superclass.setBounds.call(this, rect);
	        },
	        setLineWidth: function(w) {
	            this.scaledPoints = null;
	            ScalablePolygonShape.superclass.setLineWidth.call(this, w);
	        }
	    });

	    return ScalablePolygonShape;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 62 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(9),
	    __webpack_require__(17),
	    __webpack_require__(22),
	    __webpack_require__(16),
	    __webpack_require__(57)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Point, Transform, ColorConstants, PointList, Polyline) {
	    'use strict';

	    /**
	     * 折线修饰
	     * @extends Polyline
	     * @class 折线修饰
	     * @constructor
	     * @return 一个新的折线修饰
	     */
	    var PolylineDecoration = function(id) {
	        PolylineDecoration.superclass.constructor.call(this, id);
	        this.location = new Point(0, 0);
	        this.template = PolylineDecoration.TRIANGLE_TIP;
	        this.transform = new Transform();
	        this.setBackgroundColor(ColorConstants.black);
	        this.setScale(7, 3);

	    };

	    //static properties

	    PolylineDecoration.TRIANGLE_TIP = new PointList();
	    PolylineDecoration.TRIANGLE_TIP.addPoint(-1, 1);
	    PolylineDecoration.TRIANGLE_TIP.addPoint(0, 0);
	    PolylineDecoration.TRIANGLE_TIP.addPoint(-1, -1);


	    util.defineClass(PolylineDecoration, Polyline, {
	        getPoints: function() {
	            if (this.points == null) {
	                this.points = new PointList();
	                for (var i = 0; i < this.template.size; i++) {
	                    this.points.addPoint(this.transform.getTransformed(this.template.getPoint(i)));
	                }
	            }
	            return this.points;
	        },
	        setLocation: function(p) {
	            this.points = null;
	            this.bounds = null;
	            this.location.setLocation(p);
	            this.transform.setTranslation(p.x, p.y);
	        },
	        /**
	         * 设置模板
	         * @param {PointList} pl 模板
	         */
	        setTemplate: function(pl) {
	            this.erase();
	            this.template = pl;
	            this.points = null;
	            this.bounds = null;
	            this.repaint();
	        },
	        /**
	         * 设置缩放比例
	         * @param {Number} x 横向缩放比例
	         * @param {Number} y 纵向缩放比例
	         */
	        setScale: function(x, y) {
	            this.points = null;
	            this.bounds = null;
	            this.transform.setScale(x, y);
	        },
	        /**
	         * 设置引用的点
	         * @param {Point} ref 引用点
	         */
	        setReferencePoint: function(ref) {
	            var pt = Point.SINGLETON;
	            pt.setLocation(ref);
	            pt.negate().translate(this.location);
	            this.setRotation(Math.atan2(pt.y, pt.x));
	        },
	        /**
	         * 设置旋转角度
	         * @param {Number} angle 旋转的角度
	         */
	        setRotation: function(angle) {
	            this.points = null;
	            this.bounds = null;
	            this.transform.setRotation(angle);
	        }
	    });

	    return PolylineDecoration;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 63 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(16),
	    __webpack_require__(9),
	    __webpack_require__(17),
	    __webpack_require__(59)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, PointList, Point, Transform, Polygon) {
	    'use strict';

	    /**
	     * 多边形修饰
	     * @extends Polygon
	     * @class 多边形修饰
	     * @constructor
	     * @return 一个新的多边形修饰
	     */
	    var PolygonDecoration = function(id) {
	        PolygonDecoration.superclass.constructor.call(this, id);
	        this.location = new Point();
	        this.template = PolygonDecoration.TRIANGLE_TIP;
	        this.transform = new Transform();
	        this.setFill(true);
	        this.setScale(7, 3);

	    };

	    //static properties

	    PolygonDecoration.TRIANGLE_TIP = new PointList();
	    PolygonDecoration.INVERTED_TRIANGLE_TIP = new PointList();
	    PolygonDecoration.TRIANGLE_TIP.addPoint(0, 0);
	    PolygonDecoration.TRIANGLE_TIP.addPoint(-1, 1);
	    PolygonDecoration.TRIANGLE_TIP.addPoint(-1, -1);
	    PolygonDecoration.INVERTED_TRIANGLE_TIP.addPoint(0, 1);
	    PolygonDecoration.INVERTED_TRIANGLE_TIP.addPoint(0, -1);
	    PolygonDecoration.INVERTED_TRIANGLE_TIP.addPoint(-1, 0);

	    util.defineClass(PolygonDecoration, Polygon, {
	        getLocalBackgroundColor: function() {
	            var parentBackGroundColor = PolygonDecoration.superclass.getLocalBackgroundColor.call(this);
	            if (parentBackGroundColor == null) {
	                return this.getForegroundColor();
	            } else {
	                return parentBackGroundColor;
	            }
	        },
	        getPoints: function() {
	            if (this.points == null) {
	                this.points = new PointList();
	                for (var i = 0; i < this.template.size; i++) {
	                    this.points.addPoint(this.transform.getTransformed(this.template.getPoint(i)));
	                }
	            }
	            return this.points;
	        },
	        setLocation: function(p) {
	            this.points = null;
	            this.bounds = null;
	            this.location.setLocation(p);
	            this.transform.setTranslation(p.x, p.y);
	        },
	        /**
	         * 设置模板
	         * @param {PointList} pl 模板
	         */
	        setTemplate: function(pl) {
	            this.erase();
	            this.template = pl;
	            this.points = null;
	            this.bounds = null;
	            this.repaint();
	        },
	        /**
	         * 设置缩放比例
	         * @param {Number} x 横向缩放比例
	         * @param {Number} y 纵向缩放比例
	         */
	        setScale: function(x, y) {
	            this.points = null;
	            this.bounds = null;
	            this.transform.setScale(x, y);
	        },
	        /**
	         * 设置引用的点
	         * @param {Point} ref 引用点
	         */
	        setReferencePoint: function(ref) {
	            var pt = Point.SINGLETON;
	            pt.setLocation(ref);
	            pt.negate().translate(this.location);
	            this.setRotation(Math.atan2(pt.y, pt.x));
	        },
	        /**
	         * 设置旋转角度
	         * @param {Number} angle 旋转的角度
	         */
	        setRotation: function(angle) {
	            this.points = null;
	            this.bounds = null;
	            this.transform.setRotation(angle);
	        }
	    });

	    return PolygonDecoration;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 64 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(25)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Figure) {
	    'use strict';

	    var RootFigure = function(lws) {
	        RootFigure.superclass.constructor.call(this);
	        this.lws = lws;
	    };

	    util.defineClass(RootFigure, Figure, {
	        getUpdateManager: function() {
	            return this.lws.getUpdateManager();
	        },
	        internalGetEventDispatcher: function() {
	            return this.lws.getEventDispatcher();
	        },
	        isShowing: function() {
	            return true;
	        }
	    });

	    return RootFigure;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 65 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(25),
	    __webpack_require__(9)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Figure, Point) {
	    'use strict';

	    /**
	     * @class 图层
	     * @constructor
	     * @extends Figure
	     * @param {String} id 图形id
	     * @returns
	     */
	    var Layer = function(id) {
	        Layer.superclass.constructor.call(this, id);

	    };

	    //static properties
	    util.defineClass(Layer, Figure, {
	        containsPoint: function(x, y) {
	            if (this.isOpaque()) {
	                return Layer.superclass.containsPoint.call(this, x, y);
	            }
	            var pt = Point.SINGLETON;
	            pt.setLocation(x, y);
	            this.translateFromParent(pt);
	            x = pt.x;
	            y = pt.y;
	            for (var i = 0; i < this.children.length; i++) {
	                var child = this.children[i];
	                if (child.containsPoint(x, y)) {
	                    return true;
	                }
	            }
	            return false;
	        },
	        findFigureAt: function(x, y, search) {
	            if (!this.isEnabled()) {
	                return null;
	            }
	            if (this.isOpaque()) {
	                return Layer.superclass.findFigureAt.call(this, x, y, search);
	            }
	            var f = Layer.superclass.findFigureAt.call(this, x, y, search);
	            if (f == this) {
	                return null;
	            }
	            return f;
	        }
	    });

	    return Layer;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 66 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(65),
	    __webpack_require__(67),
	    __webpack_require__(25)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Layer, StackLayout, Figure) {
	    'use strict';

	    /**
	     * @class 图层窗格
	     * @constructor
	     * @extends Layer
	     * @param {String} id 图形id
	     * @returns
	     */
	    var LayeredPane = function(id) {
	        LayeredPane.superclass.constructor.call(this, id);
	        this.layerKeys = [];
	        this.setLayoutManager(new StackLayout());

	    };


	    //static properties
	    util.defineClass(LayeredPane, Layer, {
	        add: function(figure, layerKey, index) {
	            if (index == -1) {
	                index = this.layerKeys.length;
	            }
	            LayeredPane.superclass.add.call(this, figure, null, index);
	            util.Array.add(this.layerKeys, layerKey, index);
	        },
	        /**
	         * 在某图层之后插入图层
	         * @param {Layer} layer 待插入图层
	         * @param {Object} key  待插入图层在图层窗口中使用的key
	         * @param {Layer} after 用于定位的图层
	         */
	        addLayerAfter: function(layer, key, after) {
	            var index = util.Array.indexOf(this.layerKeys, after);
	            this.add(layer, key, ++index);

	        },
	        /**
	         * 在某图层之前插入图层
	         * @param {Layer} layer 待插入图层
	         * @param {Object} key  待插入图层在图层窗口中使用的key
	         * @param {Layer} after 用于定位的图层
	         */
	        addLayerBefore: function(layer, key, before) {
	            var index = util.Array.indexOf(this.layerKeys, before);
	            this.add(layer, key, index);
	        },
	        /**
	         * @private
	         */
	        getLayerbyKey: function(key) {
	            var index = util.Array.indexOf(this.layerKeys, key);
	            if (index == -1) {
	                return null;
	            }
	            return this.children[index];
	        },
	        /**
	         * 得到某图层
	         * @param {int|Object} arg 图层的位置或者Key
	         */
	        getLayer: function(arg) {
	            if (arg > 0) {
	                return this.children[index];
	            } else {
	                return this.getLayerbyKey(arg);
	            }

	        },
	        remove: function(figure) {
	            var index = util.Array.indexOf(this.children, figure);
	            if (index != -1) {
	                util.Array.remove(this.layerKeys, index);
	            }
	            LayeredPane.superclass.remove.call(this, figure);
	        },
	        /**
	         * 移除图层
	         * @param {int|Figure} arg 图层的位置或者Key
	         */
	        removeLayer: function(arg) {
	            if (arg == null) {
	                return;
	            }
	            var removeLayer;
	            if (arg >= 0) {
	                removeLayer = this.getLayer(index);
	            } else if (util.isInstanceOf(arg, Figure)) {
	                removeLayer = arg;
	            } else {
	                removeLayer = this.getLayer(util.Array.indexOf(this.layerKeys, key));
	            }
	            this.remove(removeLayer);
	        }
	    });

	    return LayeredPane;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 67 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(68),
	    __webpack_require__(10)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractLayout, Dimension) {
	    'use strict';

	    /**
	     *
	     * @class 栈布局
	     * @constructor
	     * @extends AbstractLayout
	     */
	    var StackLayout = function() {
	        StackLayout.superclass.constructor.call(this);
	    };

	    //static properties
	    util.defineClass(StackLayout, AbstractLayout, {
	        calculatePreferredSize: function(figure, wHint, hHint) {
	            if (wHint > -1) {
	                wHint = Math.max(0, wHint - figure.getInsets().getWidth());
	            }
	            if (hHint > -1) {
	                hHint = Math.max(0, hHint - figure.getInsets().getWidth());
	            }
	            var d = new Dimension();
	            var children = figure.getChildren();
	            var child;
	            for (var i = 0; i < children.length; i++) {
	                child = children[i];
	                if (!this.isObservingVisibility || child.isVisible()) {
	                    d.union(child.getPreferredSize(wHint, hHint));
	                }
	            }

	            d.expand(figure.getInsets().getWidth(), figure.getInsets().getHeight());
	            d.union(this.getBorderPreferredSize(figure));

	            return d;
	            //////////////////////////////////!!!!!!!!!!!!!!!!!!!!!!!HERE HERE   HERE HERE READ ME!!!!!!!!!!!!!!!!!!
	        },
	        /**
	         *
	         */
	        layout: function(figure) {
	            var rect = figure.getClientArea();
	            var children = figure.getChildren();
	            var i;
	            for (i = 0; i < children.length; i++) {
	                children[i].setBounds(rect);
	            }

	        },
	        setConstraint: function() {

	        }
	    });

	    return StackLayout;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 68 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(10)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Dimension) {
	    'use strict';

	    /**
	     *
	     * @class 抽象的布局类
	     * @constructor
	     * @returns
	     */
	    var AbstractLayout = function() {
	        AbstractLayout.superclass.constructor.call(this);
	        this.preferredSize;
	        this.isObservingVisibility = false;

	    };

	    //static properties
	    util.defineClass(AbstractLayout, Object, {
	        calculatePreferredSize: function() {},
	        getBorderPreferredSize: function(container) {
	            if (container.getBorder() == null)
	                return new Dimension();
	            return container.getBorder().getPreferredSize(container);
	        },
	        /**
	         * 得到某个子图形的约束
	         * @param {Figure} child
	         */
	        getConstraint: function(child) {
	            return null;
	        },
	        /**
	         * 得到最小大小
	         * @param {Figure} container 父图形
	         * @param {int} wHint 宽度
	         * @param {int} hHint 高度
	         */
	        getMinimumSize: function(container, wHint, hHint) {
	            if (wHint != null && hHint != null) {
	                return this.getPreferredSize(container, wHint, hHint);
	            }
	        },
	        /**
	         * 得到首选大小
	         * @param {Figure} container 父图形
	         * @param {int} wHint 宽度
	         * @param {int} hHint 高度
	         */
	        getPreferredSize: function(container, wHint, hHint) {
	            // if(wHint == null || hHint == null){
	            //   return;
	            // }
	            if (!this.preferredSize) {
	                this.preferredSize = this.calculatePreferredSize(container, wHint, hHint);
	            }
	            return this.preferredSize;
	        },
	        /**
	         * 使布局无效
	         */
	        invalidate: function() {
	            this.preferredSize = null;
	        },
	        /**
	         *
	         */
	        isObservingVisibility: function() {
	            return this.isObservingVisibility;
	        },
	        /**
	         * 移除某个子图形
	         * @param {Figure} child 子图形
	         */
	        remove: function(child) {
	            this.invalidate();
	        },
	        /**
	         * 为子图形设置约束
	         * @param {Figure} child 子图形
	         * @param {Object} constraint 约束
	         */
	        setConstraint: function(child, constraint) {
	            this.invalidate(child);
	        },
	        /**
	         *
	         */
	        setObserveVisibility: function(newValue) {
	            if (this.isObservingVisibility == newValue)
	                return;
	            this.isObservingVisibility = newValue;
	        }
	    });

	    return AbstractLayout;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 69 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(66),
	    __webpack_require__(12)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, LayeredPane, Rectangle) {
	    'use strict';

	    /**
	     * @class 可缩放的图层窗格
	     * @constructor
	     * @extends LayeredPane
	     * @param {String} id
	     * @returns
	     */
	    var ScalableLayeredPane = function(id) {
	        ScalableLayeredPane.superclass.constructor.call(this, id);
	        this.scale = 1;
	    };

	    //static properties
	    util.defineClass(ScalableLayeredPane, LayeredPane, {
	        /**
	         * 得到客户区
	         * @param {Rectangle} rect 用于存放结果的矩形，如果为空此方法将新建一个矩形
	         */
	        getClientArea: function(rect) {
	            if (rect == null) {
	                rect = new Rectangle(0, 0, 0, 0);
	            }
	            ScalableLayeredPane.superclass.getClientArea.call(this, rect);
	            rect.width /= this.scale;
	            rect.height /= this.scale;
	            rect.x /= this.scale;
	            rect.y /= this.scale;
	            return rect;
	        },
	        getMinimumSize: function(wHint, hHint) {
	            var d = ScalableLayeredPane.superclass.getMinimumSize.call(this, wHint / this.getScale(), hHint / this.getScale());
	            var w = this.getInsets().getWidth();
	            var h = this.getInsets().getHeight();
	            return d.getExpanded(-w, -h).scale(this.scale).expand(w, h);
	        },
	        getPreferredSize: function(wHint, hHint) {
	            var d = ScalableLayeredPane.superclass.getPreferredSize.call(this, wHint / this.getScale(), hHint / this.getScale());
	            var w = this.getInsets().getWidth();
	            var h = this.getInsets().getHeight();
	            return d.getExpanded(-w, -h).scale(this.scale).expand(w, h);
	        },
	        /**
	         * 得到缩放值
	         * @type Number
	         */
	        getScale: function() {
	            return this.scale;
	        },
	        isCoordinateSystem: function() {
	            return true;
	        },
	        paintClientArea: function(graphics) {
	            if (this.children.length == 0) {
	                return;
	            }
	            if (this.scale == 1) {
	                ScalableLayeredPane.superclass.paintClientArea.call(this, graphics);
	            } else {
	                /*
	                var g = new ScaledGraphics(graphics);
	                var optimizeClip = (this.getBorder() == null || this.getBorder().isOpaque());
	                if (!optimizeClip){
	                  g.clipRect(getBounds().getCropped(getInsets()));
	                }
	                g.scale(this.scale);
	                g.pushState();
	                paintChildren(g);
	                g.dispose();
	                graphics.restoreState();
	                */
	                var optimizeClip = (this.getBorder() == null || this.getBorder().isOpaque());
	                if (!optimizeClip) {
	                    graphics.clipRect(this.getBounds().getCropped(this.getInsets()));
	                }
	                /*
	                var scaledGraphics = this.scale>1?new VectorScaledGraphics(graphics):graphics;
	                scaledGraphics.scale(this.scale,this.scale);
	                scaledGraphics.pushState();
	                this.paintChildren(scaledGraphics);
	                scaledGraphics.restoreState();
	                if(this.scale>1){
	                  scaledGraphics.dispose();
	                }
	                */

	                graphics.scale(this.scale, this.scale);
	                graphics.pushState();
	                this.paintChildren(graphics);
	                graphics.restoreState();
	            }
	        },
	        /**
	         * 设置缩放值
	         * @param {Number} newZoom 新的缩放值
	         */
	        setScale: function(newZoom) {
	            if (this.scale == newZoom) {
	                return;
	            }
	            this.scale = newZoom;
	            this.revalidate();
	            this.repaint();
	        },
	        translateFromParent: function(t) {
	            t.performScale(1 / this.scale);
	        },
	        translateToParent: function(t) {
	            t.performScale(this.scale);
	        }
	    });

	    return ScalableLayeredPane;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 70 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(71),
	    __webpack_require__(66)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, FreeformHelper, LayeredPane) {
	    'use strict';

	    /**
	     *
	     * @class 自由图层窗格
	     * @constructor
	     * @extends LayeredPane
	     * @param {String} id 图形id
	     * @returns
	     */
	    var FreeformLayeredPane = function(id) {
	        FreeformLayeredPane.superclass.constructor.call(this, id);
	        this.helper = new FreeformHelper(this);
	        this.setLayoutManager(null);
	    };

	    //static properties
	    util.defineClass(FreeformLayeredPane, LayeredPane, {
	        add: function(child, constraint, index) {
	            FreeformLayeredPane.superclass.add.call(this, child, constraint, index);
	            this.helper.hookChild(child);
	        },
	        /**
	         * 增加freeform监听器,用于监听freeform大小的变化
	         */
	        addFreeformListener: function(listener) {
	            this.addListener("FreeformListener", listener);
	        },
	        /**
	         * 通知大小改变
	         */
	        fireExtentChanged: function() {
	            var iter = this.getListeners("FreeformListener");
	            while (iter.hasNext()) {
	                iter.next().notifyFreeformExtentChanged();
	            }
	        },
	        fireMoved: function() {},
	        getFreeformHelper: function() {
	            return this.helper;
	        },
	        /**
	         * 得到freeform大小
	         */
	        getFreeformExtent: function() {
	            return this.helper.getFreeformExtent();
	        },
	        primTranslate: function(dx, dy) {
	            this.bounds.x += dx;
	            this.bounds.y += dy;
	        },
	        remove: function(child) {
	            this.helper.unhookChild(child);
	            FreeformLayeredPane.superclass.remove.call(this, child);
	        },
	        /**
	         * 移除freeform监听器
	         * @see #addFreeformListener
	         */
	        removeFreeformListener: function(listener) {
	            this.removeListener("FreeformListener", listener);
	        },
	        /**
	         * 设置freeform边界
	         * @param {Rectangle} bounds
	         */
	        setFreeformBounds: function(bounds) {
	            this.helper.setFreeformBounds(bounds);
	        },
	        superFireMoved: function() {
	            FreeformLayeredPane.superclass.fireMoved.call(this);
	        }
	    });

	    return FreeformLayeredPane;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 71 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(12)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Rectangle) {
	    'use strict';

	    var FreeformHelper = function(host) {
	        FreeformHelper.superclass.constructor.call(this);
	        this.host = host;
	        this.freeformExtent = null;
	        this.figureListener = {
	            figureMoved: function(figure) {
	                this.invalidate();
	            }.bind(this)
	        };
	    };

	    util.defineClass(FreeformHelper, Object, {
	        getFreeformExtent: function() {
	            if (this.freeformExtent != null) {
	                return this.freeformExtent;
	            }
	            var r;
	            var children = this.host.getChildren();
	            for (var i = 0; i < children.length; i++) {
	                var child = children[i];
	                if (child.getFreeformExtent != null) {
	                    r = child.getFreeformExtent();
	                } else {
	                    r = child.getBounds();
	                }
	                if (this.freeformExtent == null) {
	                    this.freeformExtent = r.getCopy();
	                } else {
	                    this.freeformExtent.union(r);
	                }
	            }
	            var insets = this.host.getInsets();
	            if (this.freeformExtent == null) {
	                this.freeformExtent = new Rectangle(0, 0, insets.getWidth(), insets.getHeight());
	            } else {
	                this.host.translateToParent(this.freeformExtent);
	                this.freeformExtent.expand(insets);
	            }
	            return this.freeformExtent;
	        },
	        hookChild: function(child) {
	            this.invalidate();
	            if (child.addFreeformListener != null) {
	                child.addFreeformListener(this);
	            } else {
	                child.addFigureListener(this.figureListener);
	            }
	        },
	        invalidate: function() {
	            this.freeformExtent = null;
	            this.host.fireExtentChanged();
	            if (this.host.getParent() != null) {
	                this.host.getParent().revalidate();
	            } else {
	                this.host.revalidate();
	            }
	        },
	        notifyFreeformExtentChanged: function() {
	            this.invalidate();
	        },
	        setFreeformBounds: function(bounds) {
	            this.host.setBounds(bounds);
	            bounds = bounds.getCopy();
	            this.host.translateFromParent(bounds);
	            var children = this.host.getChildren();
	            for (var i = 0; i < children.length; i++) {
	                var child = children[i];
	                if (child.setFreeformBounds != null) {
	                    child.setFreeformBounds(bounds);
	                }
	            }
	        },
	        unhookChild: function(child) {
	            this.invalidate();
	            if (child.removeFreeformListener != null) {
	                child.removeFreeformListener(this);
	            } else {
	                child.removeFigureListener(this.figureListener);
	            }
	        }
	    });

	    return FreeformHelper;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 72 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(12),
	    __webpack_require__(70)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Rectangle, FreeformLayeredPane) {
	    'use strict';

	    var ScalableFreeformLayeredPane = function(id) {
	        ScalableFreeformLayeredPane.superclass.constructor.call(this, id);
	        this.scale = 1;
	    };

	    //static properties
	    util.defineClass(ScalableFreeformLayeredPane, FreeformLayeredPane, {
	        getClientArea: function(rect) {
	            if (rect == null) {
	                rect = new Rectangle(0, 0, 0, 0);
	            }
	            ScalableFreeformLayeredPane.superclass.getClientArea.call(this, rect);
	            rect.width /= this.scale;
	            rect.height /= this.scale;
	            rect.x /= this.scale;
	            rect.y /= this.scale;
	            return rect;
	        },
	        getScale: function() {
	            return this.scale;
	        },
	        isCoordinateSystem: function() {
	            return true;
	        },
	        paintClientArea: function(graphics) {
	            if (this.children.length == 0) {
	                return;
	            }
	            if (this.scale == 1) {
	                ScalableFreeformLayeredPane.superclass.paintClientArea.call(this, graphics);
	            } else {
	                /*
	                  g = new ScaledGraphics(graphics);
	                  var optimizeClip = this.getBorder() == null || this.getBorder().isOpaque();
	                  if (!optimizeClip){
	                    g.clipRect(this.getBounds().getCropped(this.getInsets()));
	                  }
	                  g.scale(this.scale);
	                  g.pushState();
	                  this.paintChildren(g);
	                  g.dispose();
	                  graphics.restoreState();
	                  */
	                var optimizeClip = this.getBorder() == null || this.getBorder().isOpaque();
	                if (!optimizeClip) {
	                    graphics.clipRect(this.getBounds().getCropped(this.getInsets()));
	                }
	                graphics.scale(this.scale, this.scale);
	                graphics.pushState();
	                this.paintChildren(graphics);
	                graphics.restoreState();
	            }
	        },
	        setScale: function(newZoom) {
	            if (this.scale == newZoom) {
	                return;
	            }
	            this.scale = newZoom;
	            this.superFireMoved();
	            this.getFreeformHelper().invalidate();
	            this.repaint();
	        },
	        translateToParent: function(t) {
	            t.performScale(this.scale);
	        },
	        translateFromParent: function(t) {
	            t.performScale(1 / this.scale);
	        },
	        useLocalCoordinates: function() {
	            return false;
	        }
	    });

	    return ScalableFreeformLayeredPane;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 73 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(65),
	    __webpack_require__(71)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Layer, FreeformHelper) {
	    'use strict';

	    /**
	     *
	     * @class 自由图层
	     * @constructor
	     * @extends Layer
	     * @param {String} id
	     * @returns
	     */
	    var FreeformLayer = function(id) {
	        FreeformLayer.superclass.constructor.call(this, id);
	        this.helper = new FreeformHelper(this);

	    };

	    //static properties
	    util.defineClass(FreeformLayer, Layer, {
	        add: function(child, constraint, index) {
	            FreeformLayer.superclass.add.call(this, child, constraint, index);
	            this.helper.hookChild(child);
	        },
	        /**
	         * 增加freeform监听器,用于监听freeform大小的变化
	         */
	        addFreeformListener: function(listener) {
	            this.addListener("FreeformListener", listener);
	        },
	        /**
	         * 通知大小改变
	         */
	        fireExtentChanged: function() {
	            var iter = this.getListeners("FreeformListener");
	            while (iter.hasNext()) {
	                iter.next().notifyFreeformExtentChanged();
	            }
	        },
	        fireMoved: function() {},
	        /**
	         * 得到freeform大小
	         * @type Dimension
	         */
	        getFreeformExtent: function() {
	            return this.helper.getFreeformExtent();
	        },
	        primTranslate: function(dx, dy) {
	            this.bounds.x += dx;
	            this.bounds.y += dy;
	        },
	        remove: function(child) {
	            this.helper.unhookChild(child);
	            FreeformLayer.superclass.remove.call(this, child);
	        },
	        /**
	         * 移除freeform监听器
	         * @see #addFreeformListener
	         */
	        removeFreeformListener: function(listener) {
	            this.removeListener("FreeformListener", listener);
	        },
	        /**
	         * 设置freeform边界
	         * @param {Rectangle} bounds
	         */
	        setFreeformBounds: function(bounds) {
	            this.helper.setFreeformBounds(bounds);
	        }
	    });

	    return FreeformLayer;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 74 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(73),
	    __webpack_require__(58),
	    __webpack_require__(34)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, FreeformLayer, Connection, FigureIterator) {
	    'use strict';

	    /**
	     *
	     * @class 连接线层
	     * @constructor
	     * @extends FreeformLayer
	     * @param {String} id 图形id
	     * @returns
	     */
	    var ConnectionLayer = function(id) {
	        ConnectionLayer.superclass.constructor.call(this, id);
	        this.antialias = -1;
	        this.connectionRouter = null;

	    };

	    //static properties
	    util.defineClass(ConnectionLayer, FreeformLayer, {
	        add: function(figure, constraint, index) {
	            ConnectionLayer.superclass.add.call(this, figure, constraint, index);
	            if (figure.getConnectionRouter != null && this.getConnectionRouter() != null) {
	                figure.setConnectionRouter(this.getConnectionRouter());
	            }
	        },
	        /**
	         * 得到连接线路由
	         */
	        getConnectionRouter: function() {
	            return this.connectionRouter;
	        },
	        paint: function(graphics) {
	            if (this.antialias != -1) {
	                graphics.setAntialias(this.antialias);
	            }
	            ConnectionLayer.superclass.paint.call(this, graphics);
	        },
	        remove: function(figure) {
	            if (figure.setConnectionRouter != null) {
	                figure.setConnectionRouter(null);
	            }
	            ConnectionLayer.superclass.remove.call(this, figure);
	        },
	        /**
	         * 设置连接线路由
	         */
	        setConnectionRouter: function(router) {
	            this.connectionRouter = router;
	            var iter = new FigureIterator(this);
	            var figure;
	            while (iter.hasNext()) {
	                figure = iter.nextFigure();
	                if (util.isInstanceOf(figure, Connection)) {
	                    figure.setConnectionRouter(router);
	                }
	            }
	        },
	        setAntialias: function(antialias) {
	            this.antialias = antialias;
	        }
	    });

	    return ConnectionLayer;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 75 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(5),
	    __webpack_require__(68),
	    __webpack_require__(12),
	    __webpack_require__(10)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Map, AbstractLayout, Rectangle, Dimension) {
	    'use strict';

	    /**
	     *
	     * @class 坐标布局
	     * @constructor
	     * @extends AbstractLayout
	     * @returns
	     */
	    var XYLayout = function() {
	        XYLayout.superclass.constructor.call(this);
	        this.constraints = new Map();
	    };


	    //static properties
	    util.defineClass(XYLayout, AbstractLayout, {
	        calculatePreferredSize: function(f, wHint, hHint) {
	            var rect = new Rectangle();
	            var children = f.getChildren();
	            for (var i = 0; i < children.length; i++) {
	                var child = children[i];
	                var r = this.constraints.get(child);
	                if (r == null) {
	                    continue;
	                }
	                if (r.width == -1 || r.height == -1) {
	                    var preferredSize = child.getPreferredSize(r.width, r.height);
	                    r = r.getCopy();
	                    if (r.width == -1) {
	                        r.width = preferredSize.width;
	                    }
	                    if (r.height == -1) {
	                        r.height = preferredSize.height;
	                    }
	                }
	                rect.union(r);
	            }
	            var d = rect.getSize();
	            var insets = f.getInsets();
	            return new Dimension(d.width + insets.getWidth(), d.height + insets.getHeight()).union(this.getBorderPreferredSize(f));

	        },
	        getConstraint: function(figure) {
	            return this.constraints.get(figure);
	        },
	        /**
	         * 得到初始位置，即父图形的位置
	         * @param {Figure} parent 父图形
	         */
	        getOrigin: function(parent) {
	            return parent.getClientArea().getLocation();
	        },
	        /**
	         * 进行布局
	         * @param {Figure} parent 父图形
	         */
	        layout: function(parent) {
	            var children = parent.children;
	            var offset = this.getOrigin(parent);
	            var figure;
	            var i;

	            for (i = 0; i < children.length; i++) {
	                figure = children[i];
	                var bounds = this.getConstraint(figure);
	                if (!bounds) continue;
	                if (bounds.width == -1 || bounds.height == -1) {
	                    var preferredSize = figure.getPreferredSize(bounds.width, bounds.height);
	                    bounds = bounds.getCopy();
	                    if (bounds.width == -1) {
	                        bounds.width = preferredSize.width;
	                    }
	                    if (bounds.height == -1) {
	                        bounds.height = preferredSize.height;
	                    }
	                }
	                bounds = bounds.getTranslated(offset);
	                figure.setBounds(bounds);
	            }
	        },
	        remove: function(figure) {
	            XYLayout.superclass.remove.call(this, figure);
	            this.constraints.remove(figure);
	        },
	        setConstraint: function(figure, newConstraint) {
	            XYLayout.superclass.setConstraint.call(this, figure, newConstraint);
	            if (newConstraint) {
	                this.constraints.put(figure, newConstraint);
	            }
	        }
	    });

	    return XYLayout;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 76 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(75),
	    __webpack_require__(9)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, XYLayout, Point) {
	    'use strict';

	    /**
	     *
	     * @class 自由布局，freeformFigure专用
	     * @constructor
	     * @extends XYLayout
	     * @returns
	     */
	    var FreeformLayout = function() {
	        FreeformLayout.superclass.constructor.call(this);
	        this.flags = 0;
	        this.origin = null;
	    };


	    //static properties
	    FreeformLayout.FLAG__POSITIVE_COORDINATES = 1;

	    util.defineClass(FreeformLayout, XYLayout, {
	        getOrigin: function(figure) {
	            if (this.origin == null) {
	                this.origin = new Point();
	                if (this.isPositiveCoordinates()) {
	                    var children = figure.getChildren();
	                    var f;
	                    var constraint;
	                    for (var i = 0, max = children.length; i < max; i++) {
	                        f = children[i];
	                        constraint = this.getConstraint(f);
	                        if (constraint != null) {
	                            this.origin.x = Math.min(this.origin.x, this.constraint.x);
	                            this.origin.y = Math.min(this.origin.y, this.constraint.y);
	                        }
	                    }
	                    this.origin.negate();
	                }
	            }
	            return this.origin;
	        },
	        isPositiveCoordinates: function() {
	            return (this.flags & FreeformLayout.FLAG__POSITIVE_COORDINATES) != 0;
	        },
	        setPositiveCoordinates: function(positiveCoordinates) {
	            if (positiveCoordinates != this.isPositiveCoordinates()) {
	                if (positiveCoordinates) {
	                    this.flags |= FreeformLayout.FLAG__POSITIVE_COORDINATES;
	                } else {
	                    this.flags &= ~FreeformLayout.FLAG__POSITIVE_COORDINATES;
	                }
	                this.invalidate();
	            }
	        },
	        invalidate: function() {
	            this.origin = null;
	            FreeformLayout.superclass.invalidate.call(this);
	        }
	    });

	    return FreeformLayout;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 77 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(5),
	    __webpack_require__(68),
	    __webpack_require__(10)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Map, AbstractLayout, Dimension) {
	    'use strict';

	    /**
	     *
	     * @class 委托布局
	     * @constructor
	     * @extends AbstractLayout
	     * @returns
	     */
	    var DelegatingLayout = function() {
	        DelegatingLayout.superclass.constructor.call(this);
	        this.constraints = new Map();

	    };

	    //static properties
	    util.defineClass(DelegatingLayout, AbstractLayout, {
	        calculatePreferredSize: function(parent, wHint, hHint) {
	            var children = parent.getChildren();
	            var d = new Dimension();
	            for (var i = 0; i < children.length; i++) {
	                var child = children[i];
	                d.union(child.getPreferredSize());
	            }
	            return d;
	        },
	        getConstraint: function(child) {
	            return this.constraints.get(child);
	        },
	        /**
	         * 进行布局
	         * @param {Figure} paren 父图形
	         */
	        layout: function(parent) {
	            var children = parent.getChildren();
	            for (var i = 0; i < children.length; i++) {
	                var child = children[i];
	                var locator = this.constraints.get(child);
	                if (locator != null) {
	                    locator.relocate(child);
	                }
	            }
	        },
	        remove: function(child) {
	            this.constraints.remove(child);
	        },
	        setConstraint: function(figure, constraint) {
	            DelegatingLayout.superclass.setConstraint.call(this, figure, constraint);
	            if (constraint != null) {
	                this.constraints.put(figure, constraint);
	            }
	        }
	    });

	    return DelegatingLayout;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 78 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(10),
	    __webpack_require__(68)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Dimension, AbstractLayout) {
	    'use strict';
	    /**
	     *
	     * @class 抽象的提示布局
	     * @constructor
	     * @extends AbstractLayout
	     * @returns
	     */
	    var AbstractHintLayout = function() {
	        AbstractHintLayout.superclass.constructor.call(this);
	        this.minimumSize = null;
	        this.cachedPreferredHint = new Dimension(-1, -1);
	        this.cachedMinimumHint = new Dimension(-1, -1);

	    };


	    //static properties
	    util.defineClass(AbstractHintLayout, AbstractLayout, {
	        calculateMinimumSize: function(container, wHint, hHint) {
	            return this.getPreferredSize(container, wHint, hHint);
	        },
	        getMinimumSize: function(container, w, h) {
	            var flush = this.cachedMinimumHint.width != w && this.isSensitiveHorizontally(container);
	            flush |= this.cachedMinimumHint.height != h && this.isSensitiveVertically(container);
	            if (flush) {
	                this.minimumSize = null;
	                this.cachedMinimumHint.width = w;
	                this.cachedMinimumHint.height = h;
	            }
	            if (this.minimumSize == null) {
	                this.minimumSize = this.calculateMinimumSize(container, w, h);
	            }
	            return this.minimumSize;
	        },
	        getPreferredSize: function(container, w, h) {
	            var flush = this.cachedPreferredHint.width != w && this.isSensitiveHorizontally(container);
	            flush |= this.cachedPreferredHint.height != h && this.isSensitiveVertically(container);
	            if (flush) {
	                this.preferredSize = null;
	                this.cachedPreferredHint.width = w;
	                this.cachedPreferredHint.height = h;
	            }

	            return AbstractHintLayout.superclass.getPreferredSize.call(this, container, w, h);
	        },
	        invalidate: function() {
	            this.minimumSize = null;
	            AbstractHintLayout.superclass.invalidate.call(this);
	        },
	        /**
	         * 是否横向敏感
	         * @type boolean
	         */
	        isSensitiveHorizontally: function() {
	            return true;
	        },
	        /**
	         * 是否纵向敏感
	         * @type boolean
	         */
	        isSensitiveVertically: function() {
	            return true;
	        }
	    });

	    return AbstractHintLayout;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 79 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(78),
	    __webpack_require__(10),
	    __webpack_require__(12)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractHintLayout, Dimension, Rectangle) {
	    'use strict';

	    /**
	     *
	     * @class 视口布局
	     * @constructor
	     * @extend AbstractHintLayout
	     * @returns
	     */
	    var ViewportLayout = function() {
	        ViewportLayout.superclass.constructor.call(this);
	    };

	    util.defineClass(ViewportLayout, AbstractHintLayout, {
	        calculateMinimumSize: function(figure, wHint, hHint) {
	            var viewport = figure;
	            var min = new Dimension();
	            var insets = viewport.getInsets();
	            return min.getExpanded(insets.getWidth(), insets.getHeight());
	        },
	        calculatePreferredSize: function(parent, wHint, hHint) {
	            var viewport = parent;
	            var insets = viewport.getInsets();
	            var contents = viewport.getContents();
	            if (viewport.getContentsTracksWidth() && wHint > -1) {
	                wHint = Math.max(0, wHint - insets.getWidth());
	            } else {
	                wHint = -1;
	            }
	            if (viewport.getContentsTracksHeight() && hHint > -1) {
	                hHint = Math.max(0, hHint - insets.getHeight());
	            } else {
	                hHint = -1;
	            }
	            if (contents == null) {
	                return new Dimension(insets.getWidth(), insets.getHeight());
	            } else {
	                var minSize = contents.getMinimumSize(wHint, hHint);
	                if (wHint > -1) {
	                    wHint = Math.max(wHint, minSize.width);
	                }
	                if (hHint > -1) {
	                    hHint = Math.max(hHint, minSize.height);
	                }
	                return contents.getPreferredSize(wHint, hHint).getExpanded(insets.getWidth(), insets.getHeight());
	            }
	        },
	        isSensitiveHorizontally: function(parent) {
	            return parent.getContentsTracksWidth();
	        },
	        isSensitiveVertically: function(parent) {
	            return parent.getContentsTracksHeight();
	        },
	        /**
	         * 进行布局
	         * @param {Figure} figure 父图形
	         */
	        layout: function(figure) {
	            var viewport = figure;
	            var contents = viewport.getContents();
	            if (contents == null) return;

	            var p = viewport.getClientArea().getLocation();
	            p.translate(viewport.getViewLocation().getNegated());
	            var hints = viewport.getClientArea();
	            var wHint = viewport.getContentsTracksWidth() ? hints.width : -1;
	            var hHint = viewport.getContentsTracksHeight() ? hints.height : -1;

	            var newSize = viewport.getClientArea().getSize();
	            var min = contents.getMinimumSize(wHint, hHint);
	            var pref = contents.getPreferredSize(wHint, hHint);

	            if (viewport.getContentsTracksHeight()) {
	                newSize.height = Math.max(newSize.height, min.height);
	            } else {
	                newSize.height = Math.max(newSize.height, pref.height);
	            }

	            if (viewport.getContentsTracksWidth()) {
	                newSize.width = Math.max(newSize.width, min.width);
	            } else {
	                newSize.width = Math.max(newSize.width, pref.width);
	            }
	            contents.setBounds(new Rectangle(p, newSize));
	        }
	    });

	    return ViewportLayout;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 80 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(79)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, ViewportLayout) {
	    'use strict';

	    /**
	     *
	     * @class 自由视口布局
	     * @constructor
	     * @extends ViewportLayout
	     * @returns
	     */
	    var FreeformViewportLayout = function() {
	        FreeformViewportLayout.superclass.constructor.call(this);
	    };

	    util.defineClass(FreeformViewportLayout, ViewportLayout, {
	        calculatePreferredSize: function(parent, wHint, hHint) {
	            var viewport = parent;
	            viewport.getContents().validate();
	            wHint = Math.max(0, wHint);
	            hHint = Math.max(0, hHint);
	            var size = viewport.getContents().getFreeformExtent().getExpanded(viewport.getInsets()).union(0, 0).union(wHint - 1, hHint - 1).getSize();
	            return size;

	        },
	        isSensitiveHorizontally: function(parent) {
	            return true;
	        },
	        isSensitiveVertically: function(parent) {
	            return true;
	        },
	        layout: function() {
	            //do nothing , contents updates itself.
	        }
	    });

	    return FreeformViewportLayout;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 81 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(11),
	    __webpack_require__(12)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, PositionConstants, Rectangle) {
	    'use strict';

	    /**
	     *
	     * @class 抽象定位器
	     * @constructor
	     */
	    var AbstractLocator = function() {
	        AbstractLocator.superclass.constructor.call(this);
	        this.relativePosition = PositionConstants.CENTER;
	        this.gap = 0;

	    };

	    //static properties
	    util.defineClass(AbstractLocator, Object, {
	        /**
	         * 得到间隔
	         * @type Number
	         */
	        getGap: function() {
	            return this.gap;
	        },
	        /**
	         * 得到用于定位的点
	         * @type Point
	         */
	        getReferencePoint: function() {},
	        /**
	         * 得到新的边界
	         * @param {Dimension} size 大小
	         * @param {Point} center 位置
	         */
	        getNewBounds: function(size, center) {
	            var bounds = new Rectangle(center, size);
	            bounds.x -= bounds.width / 2;
	            bounds.y -= bounds.height / 2;
	            var xFactor = 0,
	                yFactor = 0;
	            var position = this.getRelativePosition();
	            if ((position & PositionConstants.NORTH) != 0) {
	                yFactor = -1;
	            } else if ((position & PositionConstants.SOUTH) != 0) {
	                yFactor = 1;
	            }

	            if ((position & PositionConstants.WEST) != 0) {
	                xFactor = -1;
	            } else if ((position & PositionConstants.EAST) != 0) {
	                xFactor = 1;
	            }

	            bounds.x += xFactor * (bounds.width / 2 + this.getGap());
	            bounds.y += yFactor * (bounds.height / 2 + this.getGap());
	            return bounds;
	        },
	        /**
	         * 得到相对位置
	         * @type Point
	         */
	        getRelativePosition: function() {
	            return this.relativePosition;
	        },
	        /**
	         * 重新定位
	         * @param {Figure} target 需要定位的图形
	         */
	        relocate: function(target) {
	            var prefSize = target.getPreferredSize();
	            var center = this.getReferencePoint();
	            target.translateToRelative(center);
	            target.setBounds(this.getNewBounds(prefSize, center));
	        },
	        /**
	         * 设置间隔
	         * @param {Number} gap
	         */
	        setGap: function(gap) {
	            this.gap = gap;
	        },
	        /**
	         * 设置相对位置
	         * @param {Point} pos
	         */
	        setRelativePosition: function(pos) {
	            this.relativePosition = pos;
	        }
	    });

	    return AbstractLocator;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 82 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(81),
	    __webpack_require__(9)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractLocator, Point) {
	    'use strict';

	    /**
	     *
	     * @class 连接线定位器
	     * @constructor
	     * @extends AbstractLocator
	     * @param {PolylineConnection} connection
	     * @param {int} align 可用值为ConnectionLocator.SOURCE；ConnectionLocator.TARGET；ConnectionLocator.MIDDLE
	     * @returns
	     */
	    var ConnectionLocator = function(connection, align) {
	        ConnectionLocator.superclass.constructor.call(this);
	        this.setConnection(connection);
	        if (align != null) {
	            this.setAlignment(align);
	        } else {
	            this.setAlignment(ConnectionLocator.MIDDLE);
	        }

	    };

	    //static properties

	    ConnectionLocator.SOURCE = 2;
	    ConnectionLocator.TARGET = 3;
	    ConnectionLocator.MIDDLE = 4;

	    util.defineClass(ConnectionLocator, AbstractLocator, {
	        /**
	         * 得到布局值(SOURCE;TARGET;MIDDLE)
	         * @type int
	         */
	        getAlignment: function() {
	            return this.alignment;
	        },
	        /**
	         * 得到连接线
	         * @type PolylineConnection
	         */
	        getConnection: function() {
	            return this.connection;
	        },
	        getReferencePoint: function() {
	            var p = this.getLocation(this.getConnection().getPoints());
	            this.getConnection().translateToAbsolute(p);
	            return p;
	        },
	        /**
	         * 得到位置
	         * @param {PointList} points 点列表
	         * @type Point
	         */
	        getLocation: function(points) {
	            switch (this.getAlignment()) {
	                case ConnectionLocator.SOURCE:
	                    return points.getPoint(Point.SINGLETON, 0);
	                case ConnectionLocator.TARGET:
	                    return points.getPoint(Point.SINGLETON, points.size - 1);
	                case ConnectionLocator.MIDDLE:
	                    if (points.size % 2 == 0) {
	                        var i = points.size / 2;
	                        var j = i - 1;
	                        var p1 = points.getPoint(j);
	                        var p2 = points.getPoint(i);
	                        var d = p2.getDifference(p1);
	                        return Point.SINGLETON.setLocation(p1.x + d.width / 2, p1.y + d.height / 2);
	                    }
	                    var i = (points.size - 1) / 2;
	                    return points.getPoint(Point.SINGLETON, i);
	                default:
	                    return new Point(0, 0);
	            }
	        },
	        /**
	         * 设置布局值
	         * @param {int} align
	         * @see #getAlignment
	         */
	        setAlignment: function(align) {
	            this.alignment = align;
	        },
	        /**
	         * 设置连接线
	         * @param {PolylineConnection} connection
	         */
	        setConnection: function(connection) {
	            this.connection = connection;
	        }
	    });

	    return ConnectionLocator;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 83 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(82)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, ConnectionLocator) {
	    'use strict';

	    /**
	     *
	     * @class 箭头定位器
	     * @constructor
	     * @extends ConnectionLocator
	     * @see <a hefr="ConnectionLocator.html">ConnectionLocator</a>
	     */
	    var ArrowLocator = function(connection, location) {
	        ArrowLocator.superclass.constructor.call(this, connection, location);
	    };

	    util.defineClass(ArrowLocator, ConnectionLocator, {
	        relocate: function(target) {
	            var points = this.getConnection().getPoints();
	            var arrow = target;
	            arrow.setLocation(this.getLocation(points));
	            if (this.getAlignment() == ConnectionLocator.SOURCE) {
	                arrow.setReferencePoint(points.getPoint(1));
	            } else if (this.getAlignment() == ConnectionLocator.TARGET) {
	                arrow.setReferencePoint(points.getPoint(points.size - 2));
	            }
	        }
	    });

	    return ArrowLocator;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 84 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(82),
	    __webpack_require__(9)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, ConnectionLocator, Point) {
	    'use strict';

	    /**
	     *
	     * @class 中点定位器
	     * @constructor
	     * @extends ConnectionLocator
	     * @see <a hefr="ConnectionLocator.html">ConnectionLocator</a>
	     */
	    var MidpointLocator = function(connection, index) {
	        MidpointLocator.superclass.constructor.call(this, connection);
	        this.index = index;
	    };


	    util.defineClass(MidpointLocator, ConnectionLocator, {
	        getReferencePoint: function() {
	            var conn = this.getConnection();
	            var p = Point.SINGLETON;
	            var p1 = conn.getPoints().getPoint(this.getIndex());
	            var p2 = conn.getPoints().getPoint(this.getIndex() + 1);
	            conn.translateToAbsolute(p1);
	            conn.translateToAbsolute(p2);
	            p.x = (p2.x - p1.x) / 2 + p1.x;
	            p.y = (p2.y - p1.y) / 2 + p1.y;
	            return p;
	        },
	        getIndex: function() {
	            return this.index;
	        }
	    });

	    return MidpointLocator;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 85 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(82),
	    __webpack_require__(9)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, ConnectionLocator, Point) {
	    'use strict';

	    var BendpointLocator = function(connection, index) {
	        BendpointLocator.superclass.constructor.call(this, connection);
	        this.index = index;
	    };

	    util.defineClass(BendpointLocator, ConnectionLocator, {
	        getReferencePoint: function() {
	            var p = this.getConnection().getPoints().getPoint(Point.SINGLETON, this.getIndex());
	            this.getConnection().translateToAbsolute(p);
	            return p;
	        },
	        getIndex: function() {
	            return this.index;
	        }
	    });

	    return BendpointLocator;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 86 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(12),
	    __webpack_require__(11)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Rectangle, PositionConstants) {
	    'use strict';

	    /**
	     *
	     * @class 相对定位器
	     * @constructor
	     * @param arg1
	     * @param arg2
	     * @param arg3
	     */
	    var RelativeLocator = function(arg1, arg2, arg3) {
	        RelativeLocator.superclass.constructor.call(this);
	        if (arg1 == null) {
	            this.relativeX = 0;
	            this.relativeY = 0;
	        } else {
	            this.setReferenceFigure(arg1);
	            if (arg3 == null) {
	                var location = arg2;
	                switch (location & PositionConstants.NORTH_SOUTH) {
	                    case PositionConstants.NORTH:
	                        this.relativeY = 0;
	                        break;
	                    case PositionConstants.SOUTH:
	                        this.relativeY = 1;
	                        break;
	                    default:
	                        this.relativeY = 0.5;
	                }
	                switch (location & PositionConstants.EAST_WEST) {
	                    case PositionConstants.WEST:
	                        this.relativeX = 0;
	                        break;
	                    case PositionConstants.EAST:
	                        this.relativeX = 1;
	                        break;
	                    default:
	                        this.relativeX = 0.5;
	                }
	            } else {
	                this.relativeX = arg2;
	                this.relativeY = arg3;
	            }
	        }

	    };


	    //static properties
	    util.defineClass(RelativeLocator, Object, {
	        /**
	         * 重新定位
	         * @param {Figure} 需要定位的图形
	         */
	        relocate: function(target) {
	            var reference = this.getReferenceFigure();
	            var targetBounds = new Rectangle(this.getReferenceBox().getResized(-1, -1));
	            reference.translateToAbsolute(targetBounds);
	            target.translateToRelative(targetBounds);
	            targetBounds.resize(1, 1);

	            var targetSize = target.getPreferredSize();
	            targetBounds.x += Math.floor(targetBounds.width * this.relativeX - ((targetSize.width + 1) / 2));
	            targetBounds.y += Math.floor(targetBounds.height * this.relativeY - ((targetSize.height + 1) / 2));

	            targetBounds.setSize(targetSize);
	            target.setBounds(targetBounds);
	        },
	        /**
	         *
	         */
	        getReferenceBox: function() {
	            return this.getReferenceFigure().getBounds();
	        },
	        /**
	         * 得到相关的图形
	         * @type Figure
	         */
	        getReferenceFigure: function() {
	            return this.reference;
	        },
	        /**
	         * 设置相关的图形
	         * @param {Figure} reference
	         */
	        setReferenceFigure: function(reference) {
	            this.reference = reference;
	        }
	    });

	    return RelativeLocator;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 87 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    /**
	     * @class 连接线锚基类
	     * @constructor
	     * @returns
	     */
	    var ConnectionAnchorBase = function() {
	        ConnectionAnchorBase.superclass.constructor.call(this);
	        this.listeners = [];
	    };

	    //static properties
	    util.defineClass(ConnectionAnchorBase, Object, {
	        /**
	         * 增加锚监听器
	         */
	        addAnchorListener: function(listener) {
	            this.listeners.push(listener);
	        },
	        /**
	         * 移除锚监听器
	         */
	        removeAnchorListener: function(listener) {
	            util.Array.removeItem(this.listeners, listener);
	        },
	        fireAnchorMoved: function() {
	            for (var i = 0; i < this.listeners.length; i++) {
	                this.listeners[i].anchorMoved(this);
	            }
	        }
	    });

	    return ConnectionAnchorBase;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 88 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(87),
	    __webpack_require__(9)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, ConnectionAnchorBase, Point) {
	    'use strict';

	    /**
	     * @class 坐标锚
	     * @extends ConnectionAnchorBase
	     * @constructor
	     * @param {Point} p 锚的坐标
	     * @returns
	     */
	    var XYAnchor = function(p) {
	        XYAnchor.superclass.constructor.call(this);
	        this.location = new Point(p);

	    };

	    //static properties
	    util.defineClass(XYAnchor, ConnectionAnchorBase, {
	        /**
	         * 得到锚相对于某个点的位置
	         * @param {Point} reference 相对的点
	         * @type Point
	         */
	        getLocation: function(reference) {
	            return this.location;
	        },
	        /**
	         * 得到拥有者
	         */
	        getOwner: function() {
	            return null;
	        },
	        /**
	         * 得到相关的点
	         */
	        getReferencePoint: function() {
	            return this.location;
	        },
	        /**
	         * 设置位置
	         */
	        setLocation: function(p) {
	            this.location.setLocation(p);
	            this.fireAnchorMoved();
	        }
	    });

	    return XYAnchor;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 89 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(87)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, ConnectionAnchorBase) {
	    'use strict';

	    /**
	     * @class
	     * @constructor
	     * @extends ConnectionAnchorBase
	     * @param {Figure} owner 锚的拥有者(锚与拥有者的位置相同)
	     * @returns
	     */
	    var AbstractConnectionAnchor = function(owner) {
	        AbstractConnectionAnchor.superclass.constructor.call(this);
	        this.setOwner(owner);
	    };


	    //static properties
	    util.defineClass(AbstractConnectionAnchor, ConnectionAnchorBase, {
	        addAnchorListener: function(listener) {
	            if (listener == null) {
	                return;
	            }
	            if (this.listeners.length == 0) {
	                this.getOwner().addAncestorListener(this);
	            }
	            AbstractConnectionAnchor.superclass.addAnchorListener.call(this, listener);
	        },
	        ancestorMoved: function(figure) {
	            this.fireAnchorMoved();
	        },
	        ancestorAdded: function(ancestor) {},
	        ancestorRemoved: function(ancestor) {},
	        /**
	         * 得到拥有者
	         */
	        getOwner: function() {
	            return this.owner;
	        },
	        /**
	         * 得到相关的点
	         */
	        getReferencePoint: function() {
	            if (this.getOwner() == null) {
	                return;
	            } else {
	                var ref = this.getOwner().getBounds().getCenter();
	                this.getOwner().translateToAbsolute(ref);
	                return ref;
	            }
	        },
	        removeAnchorListener: function(listener) {
	            AbstractConnectionAnchor.superclass.removeAnchorListener.call(this, listener);
	            if (this.listeners.length == 0) {
	                this.getOwner().removeAncestorListener(this);
	            }
	        },
	        /**
	         * 设置拥有者
	         */
	        setOwner: function(owner) {
	            this.owner = owner;
	        }
	    });

	    return AbstractConnectionAnchor;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 90 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	  __webpack_require__,
	  __webpack_require__(3),
	  __webpack_require__(89)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractConnectionAnchor) {
	  'use strict';

	  /**
	   * @class 位于底部的连接线锚
	   * @constructor
	   * @extends AbstractConnectionAnchor
	   * @param {Figure} source 锚的拥有者
	   * @param {Number} offset 偏移值
	   * @returns
	   */
	  var BottomAnchor = function(source, offset){
	    BottomAnchor.superclass.constructor.call(this, source);
	    this.offset = offset;

	  };

	  //static properties
	  util.defineClass(BottomAnchor, AbstractConnectionAnchor, {
	    /**
	     * 得到位置
	     * @param {Point} reference 相关的点
	     */
	    getLocation: function(reference){
	      var r = this.getOwner().getBounds().getCopy();
	      this.getOwner().translateToAbsolute(r);
	      var off = this.offset;
	      if (off == -1){
	        off = r.width / 2;
	      }
	      if(r.contains(reference) || r.bottom() > reference.y){
	        return r.getTopLeft().translate(off,0);
	      }else{
	        return r.getBottomLeft().translate(off,-1);
	      }
	    }
	  });

	  return BottomAnchor;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));


/***/ },
/* 91 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(89)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractConnectionAnchor) {
	    'use strict';

	    /**
	     * @class 位于顶部的连接线锚
	     * @constructor
	     * @extends AbstractConnectionAnchor
	     * @param {Figure} source 锚的拥有者
	     * @param {Number} offset
	     * @returns
	     */
	    var TopAnchor = function(source, offset) {
	        TopAnchor.superclass.constructor.call(this, source);
	        this.offset = offset;

	    };


	    util.defineClass(TopAnchor, AbstractConnectionAnchor, {
	        /**
	         * 得到位置
	         * @param {Point} reference 相关的点
	         */
	        getLocation: function(reference) {
	            var r = this.getOwner().getBounds().getCopy();
	            this.getOwner().translateToAbsolute(r);
	            var off = this.offset;
	            if (off == -1) {
	                off = r.width / 2;
	            }
	            if (r.contains(reference) || r.y < reference.y) {
	                return r.getBottomLeft().translate(off, -1);
	            } else {
	                return r.getTopLeft().translate(off, 0);
	            }
	        }
	    });

	    return TopAnchor;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 92 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(89),
	    __webpack_require__(12),
	    __webpack_require__(9)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractConnectionAnchor, Rectangle, Point) {
	    'use strict';

	    /**
	     * @class 椭圆锚
	     * @constructor
	     * @extends AbstractConnectionAnchor
	     * @param {Figure} owner 拥有者
	     * @returns
	     */
	    var EllipseAnchor = function(owner) {
	        EllipseAnchor.superclass.constructor.call(this, owner);
	    };


	    //static properties
	    util.defineClass(EllipseAnchor, AbstractConnectionAnchor, {
	        /**
	         * 得到位置
	         * @param {Point} reference 相关的点
	         */
	        getLocation: function(reference) {
	            var r = Rectangle.SINGLETON;
	            r.setBounds(this.getOwner().getBounds());
	            r.translate(-1, -1);
	            r.resize(1, 1);
	            this.getOwner().translateToAbsolute(r);
	            var ref = r.getCenter().negate().translate(reference);
	            if (ref.x == 0) {
	                return new Point(reference.x, (ref.y > 0) ? r.bottom() : r.y);
	            }
	            if (ref.y == 0) {
	                return new Point((ref.x > 0) ? r.right() : r.x, reference.y);
	            }
	            var dx = (ref.x > 0) ? 0.5 : -0.5;
	            var dy = (ref.y > 0) ? 0.5 : -0.5;
	            var k = (ref.y * r.width) / (ref.x * r.height);
	            k = k * k;
	            return r.getCenter().translate(r.width * dx / Math.sqrt(1 + k), r.height * dy / Math.sqrt(1 + 1 / k));
	        }
	    });

	    return EllipseAnchor;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 93 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(89),
	    __webpack_require__(9),
	    __webpack_require__(12)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractConnectionAnchor, Point, Rectangle) {
	    'use strict';

	    /**
	     * @class ChopboxAnchor
	     * @constructor
	     * @extends AbstractConnectionAnchor
	     * @param {Figure} owner 拥有者
	     * @returns
	     */
	    var ChopboxAnchor = function(owner) {
	        ChopboxAnchor.superclass.constructor.call(this, owner);

	    };

	    //static properties
	    util.defineClass(ChopboxAnchor, AbstractConnectionAnchor, {
	        /**
	         * 得到位置
	         * @param {Point} reference 相关的点
	         */
	        getLocation: function(reference) {
	            var r = Rectangle.SINGLETON;
	            r.setBounds(this.getBox());
	            r.translate(-1, -1);
	            r.resize(1, 1);
	            this.getOwner().translateToAbsolute(r);
	            var centerX = r.x + 0.5 * r.width;
	            var centerY = r.y + 0.5 * r.height;
	            if (r.isEmpty() || (reference.x == Math.floor(centerX) && reference.y == Math.floor(centerY))) {
	                return new Point(Math.floor(centerX), Math.floor(centerY));
	            }
	            var dx = reference.x - centerX;
	            var dy = reference.y - centerY;
	            var scale = 0.5 / Math.max(Math.abs(dx) / r.width, Math.abs(dy) / r.height);
	            dx *= scale;
	            dy *= scale;
	            centerX += dx;
	            centerY += dy;
	            return new Point(Math.round(centerX), Math.round(centerY));

	        },
	        /**
	         * 得到拥有者的边界
	         */
	        getBox: function() {
	            return this.getOwner().getBounds();
	        },
	        getReferencePoint: function() {
	            var ref = this.getBox().getCenter();
	            this.getOwner().translateToAbsolute(ref);
	            return ref;
	        },
	        /**
	         * 时否相等
	         * @param {Object} obj
	         */
	        equals: function(obj) {
	            if (obj == null) {
	                return false;
	            }
	            if (util.isInstanceOf(obj, ChopboxAnchor)) {
	                var other = obj;
	                return other.getOwner() == this.getOwner() && other.getBox().equals(this.getBox());
	            }
	            return false;
	        }
	    });

	    return ChopboxAnchor;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 94 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(93)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, ChopboxAnchor) {
	    'use strict';

	    var LabelAnchor = function(label) {
	        LabelAnchor.superclass.constructor.call(this, label);
	    };


	    //static properties
	    util.defineClass(LabelAnchor, ChopboxAnchor, {
	        getBox: function() {
	            return this.getOwner().getIconBounds();
	        }
	    });

	    return LabelAnchor;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 95 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    var RoutingNotifier = function(id, router, listener) {
	        RoutingNotifier.superclass.constructor.call(this, id);
	        this.realRouter = router;
	        this.listeners = [];
	        if (listener != null) {
	            this.listeners.push(listener);
	        }
	    };

	    //static properties
	    util.defineClass(RoutingNotifier, Object, {
	        getConstraint: function(connection) {
	            return this.realRouter.getConstraint(connection);
	        },
	        invalidate: function(connection) {
	            for (var i = 0; i < this.listeners.length; i++) {
	                this.listeners[i].invalidate(connection);
	            }
	            this.realRouter.invalidate(connection);
	        },
	        route: function(connection) {
	            var consumed = false;
	            for (var i = 0; i < this.listeners.length; i++) {
	                consumed |= this.listeners[i].route(connection);
	            }
	            if (!consumed) {
	                this.realRouter.route(connection);
	            }
	            for (var i = 0; i < this.listeners.length; i++) {
	                this.listeners[i].postRoute(connection);
	            }
	        },
	        remove: function(connection) {
	            for (var i = 0; i < this.listeners.length; i++) {
	                this.listeners[i].remove(connection);
	            }
	            this.realRouter.remove(connection);
	        },
	        setConstraint: function(connection, constraint) {
	            for (var i = 0; i < this.listeners.length; i++) {
	                this.listeners[i].setConstraint(connection, constraint);
	            }
	            this.realRouter.setConstraint(connection, constraint);
	        }
	    });

	    return RoutingNotifier;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 96 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(9)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Point) {
	    'use strict';

	    /**
	     * @class 抽象的路由类
	     * @constructor
	     * @returns
	     */
	    var AbstractRouter = function() {
	        AbstractRouter.superclass.constructor.call(this);
	    };

	    //static properties

	    AbstractRouter.START = new Point(0, 0);
	    AbstractRouter.END = new Point(0, 0);

	    util.defineClass(AbstractRouter, Object, {
	        /**
	         * 得到连接线的约束
	         * @param {PolylineConnection} connection
	         */
	        getConstraint: function(connection) {
	            return null;
	        },
	        /**
	         * 得到连接线的终点
	         * @param {PolylineConnection} connection
	         */
	        getEndPoint: function(connection) {
	            var ref = connection.getSourceAnchor().getReferencePoint();
	            return AbstractRouter.END.setLocation(connection.getTargetAnchor().getLocation(ref));
	        },
	        /**
	         * 得到连接线的起点
	         * @param {PolylineConnection} conn
	         */
	        getStartPoint: function(conn) {
	            var ref = conn.getTargetAnchor().getReferencePoint();
	            return AbstractRouter.START.setLocation(conn.getSourceAnchor().getLocation(ref));
	        },
	        /**
	         * 使连接线无效
	         * @param {PolylineConnection} connection
	         */
	        invalidate: function(connection) {},
	        /**
	         * 移除连接线
	         * @param {PolylineConnection} connection
	         */
	        remove: function(connection) {},
	        /**
	         * 为连接线设置约束
	         * @param {PolylineConnection} connection
	         * @param {Object} constraint
	         */
	        setConstraint: function(connection, constraint) {}
	    });

	    return AbstractRouter;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 97 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(96)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractRouter) {
	    'use strict';

	    /**
	     * @class 默认的连接线路由
	     * @constructor
	     * @extends AbstractRouter
	     *
	     */
	    var NullConnectionRouter = function() {
	        NullConnectionRouter.superclass.constructor.call(this);

	    };

	    util.defineClass(NullConnectionRouter, AbstractRouter, {
	        /**
	         * 路由，为连接线设置各个点的位置
	         * @param {Connection} conn
	         */
	        route: function(conn) {
	            var points = conn.getPoints();
	            points.removeAllPoints();
	            var p;
	            p = this.getStartPoint(conn);
	            conn.translateToRelative(p);
	            points.addPoint(p);
	            p = this.getEndPoint(conn);
	            conn.translateToRelative(p);
	            points.addPoint(p);
	            conn.setPoints(points);
	        }
	    });

	    //static properties
	    AbstractRouter.NULL = new NullConnectionRouter();

	    return NullConnectionRouter;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 98 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(5),
	    __webpack_require__(9),
	    __webpack_require__(96)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Map, Point, AbstractRouter) {
	    'use strict';

	    var BendpointConnectionRouter = function() {
	        BendpointConnectionRouter.superclass.constructor.call(this);
	        this.constraints = new Map();

	    };

	    //static properties
	    BendpointConnectionRouter.A_POINT = new Point();

	    util.defineClass(BendpointConnectionRouter, AbstractRouter, {
	        getConstraint: function(connection) {
	            return this.constraints.get(connection);
	        },
	        remove: function(connection) {
	            this.constraints.remove(connection);
	        },
	        route: function(conn) {
	            var points = conn.getPoints();
	            points.removeAllPoints();
	            var bendpoints = this.getConstraint(conn);
	            if (bendpoints == null) {
	                bendpoints = [];
	            }
	            var ref1, ref2;

	            if (bendpoints.length == 0) {
	                ref1 = conn.getTargetAnchor().getReferencePoint();
	                ref2 = conn.getSourceAnchor().getReferencePoint();
	            } else {
	                ref1 = new Point(bendpoints[0].getLocation());
	                conn.translateToAbsolute(ref1);
	                ref2 = new Point(bendpoints[bendpoints.length - 1].getLocation());
	                conn.translateToAbsolute(ref2);
	            }
	            BendpointConnectionRouter.A_POINT.setLocation(conn.getSourceAnchor().getLocation(ref1));
	            conn.translateToRelative(BendpointConnectionRouter.A_POINT);
	            points.addPoint(BendpointConnectionRouter.A_POINT);

	            for (var i = 0; i < bendpoints.length; i++) {
	                var bp = bendpoints[i];
	                points.addPoint(bp.getLocation());
	            }

	            BendpointConnectionRouter.A_POINT.setLocation(conn.getTargetAnchor().getLocation(ref2));
	            conn.translateToRelative(BendpointConnectionRouter.A_POINT);
	            points.addPoint(BendpointConnectionRouter.A_POINT);
	            conn.setPoints(points);
	        },
	        setConstraint: function(connection, constraint) {
	            this.constraints.put(connection, constraint);
	        }
	    });

	    return BendpointConnectionRouter;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 99 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(9),
	    __webpack_require__(96),
	    __webpack_require__(77),
	    __webpack_require__(57),
	    __webpack_require__(95),
	    __webpack_require__(58),
	    __webpack_require__(83),
	    __webpack_require__(82),
	    __webpack_require__(97)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    Point,
	    AbstractRouter,
	    DelegatingLayout,
	    Polyline,
	    RoutingNotifier,
	    Connection,
	    ArrowLocator,
	    ConnectionLocator,
	    NullConnectionRouter
	) {
	    'use strict';

	    /**
	     * @class 折线连接线
	     * @constructor
	     * @extends Polyline
	     * @param {String} id 图形id
	     * @returns
	     */
	    var PolylineConnection = function(id) {
	        PolylineConnection.superclass.constructor.call(this, id);
	        this.startAnchor = null;
	        this.endAnchor = null;
	        this.connectionRouter = AbstractRouter.NULL;
	        this.startArrow = null;
	        this.endArrow = null;
	        this.setLayoutManager(new DelegatingLayout());
	        this.addPoint(new Point(0, 0));
	        this.addPoint(new Point(100, 100));

	    };

	    //static properties
	    util.defineClass(PolylineConnection, Polyline, {
	        addNotify: function() {
	            PolylineConnection.superclass.addNotify.call(this);
	            this.hookSourceAnchor();
	            this.hookTargetAnchor();
	        },
	        /**
	         * 增加路由监听器
	         */
	        addRoutingListener: function(listener) {
	            if (this.connectionRouter != null) {
	                if (util.isInstanceOf(this.connectionRouter, RoutingNotifier)) {
	                    this.connectionRouter.listeners.push(listener);
	                } else {
	                    this.connectionRouter = new RoutingNotifier(this.connectionRouter, listener);
	                }
	            }
	        },
	        anchorMoved: function(anchor) {
	            this.revalidate();
	        },
	        getBounds: function() {
	            if (this.bounds == null) {
	                PolylineConnection.superclass.getBounds.call(this);
	                for (var i = 0; i < this.children.length; i++) {
	                    var child = this.children[i];
	                    this.bounds.union(child.getBounds());
	                }
	            }
	            return this.bounds;
	        },
	        /**
	         * 得到路由
	         */
	        getConnectionRouter: function() {
	            if (this.connectionRouter != null) {
	                if (util.isInstanceOf(this.connectionRouter, RoutingNotifier)) {
	                    return this.connectionRouter.realRouter;
	                }
	                return this.connectionRouter;
	            }
	        },
	        /**
	         * 得到路由约束
	         */
	        getRoutingConstraint: function() {
	            if (this.getConnectionRouter() != null) {
	                return this.getConnectionRouter().getConstraint(this);
	            } else {
	                return null;
	            }
	        },
	        /**
	         * 得到起点锚
	         */
	        getSourceAnchor: function() {
	            return this.startAnchor;
	        },
	        /**
	         * 得到起点修饰
	         */
	        getSourceDecoration: function() {
	            return this.startArrow;
	        },
	        /**
	         * 得到终点锚
	         */
	        getTargetAnchor: function() {
	            return this.endAnchor;
	        },
	        /**
	         * 得到终点修饰
	         */
	        getTargetDecoration: function() {
	            return this.endArrow;
	        },
	        hookSourceAnchor: function() {
	            if (this.getSourceAnchor() != null) {
	                this.getSourceAnchor().addAnchorListener(this);
	            }
	        },
	        hookTargetAnchor: function() {
	            if (this.getTargetAnchor() != null) {
	                this.getTargetAnchor().addAnchorListener(this);
	            }
	        },
	        layout: function() {
	            if (this.getSourceAnchor() != null && this.getTargetAnchor() != null) {
	                this.connectionRouter.route(this);
	            }
	            var oldBounds = this.bounds;
	            PolylineConnection.superclass.layout.call(this);
	            this.bounds = null;
	            if (!this.getBounds().contains(oldBounds)) {
	                if (oldBounds != null) {
	                    this.getParent().translateToParent(oldBounds);
	                    this.getUpdateManager().addDirtyRegion(this.getParent(), oldBounds);
	                }
	            }
	            this.repaint();
	            this.fireFigureMoved();
	        },
	        removeNotify: function() {
	            this.unhookSourceAnchor();
	            this.unhookTargetAnchor();
	            this.connectionRouter.remove(this);
	            PolylineConnection.superclass.removeNotify.call(this);
	        },
	        /**
	         * 移除路由监听器
	         */
	        removeRoutingListener: function(listener) {
	            if (this.connectionRouter != null) {
	                if (util.isInstanceOf(this.connectionRouter, RoutingNotifier)) {
	                    this.connectionRouter.listeners.remove(listener);
	                    if (this.connectionRouter.listeners.length == 0) {
	                        this.connectionRouter = this.connectionRouter.realRouter;
	                    }
	                }
	            }
	        },
	        revalidate: function() {
	            PolylineConnection.superclass.revalidate.call(this);
	            this.connectionRouter.invalidate(this);
	        },
	        /**
	         * 设置连接线路由
	         * @param {AbstractRouter} cr 路由
	         */
	        setConnectionRouter: function(cr) {
	            if (cr == null) cr = AbstractRouter.NULL;
	            var oldRouter = this.getConnectionRouter();
	            if (oldRouter != cr) {
	                this.connectionRouter.remove(this);
	                if (this.connectionRouter != null && util.isInstanceOf(this.connectionRouter, RoutingNotifier)) {
	                    this.connectionRouter.realRouter = cr;
	                } else {
	                    this.connectionRouter = cr;
	                }
	                this.firePropertyChange(Connection.PROPERTY_CONNECTION_ROUTER, oldRouter, cr);
	                this.revalidate();
	            }
	        },
	        /**
	         * 设置路由约束
	         */
	        setRoutingConstraint: function(cons) {
	            if (this.connectionRouter != null) {
	                this.connectionRouter.setConstraint(this, cons);
	            }
	            this.revalidate();
	        },
	        /**
	         * 设置起点锚
	         */
	        setSourceAnchor: function(anchor) {
	            if (anchor == this.startAnchor) {
	                return;
	            }
	            this.unhookSourceAnchor();
	            this.startAnchor = anchor;
	            if (this.getParent() != null) {
	                this.hookSourceAnchor();
	            }
	            this.revalidate();
	        },
	        /**
	         * 设置起点修饰
	         */
	        setSourceDecoration: function(dec) {
	            if (this.startArrow == dec) {
	                return;
	            }
	            if (this.startArrow != null) {
	                this.remove(this.startArrow);
	            }
	            this.startArrow = dec;
	            if (this.startArrow != null) {
	                this.add(this.startArrow, new ArrowLocator(this, ConnectionLocator.SOURCE));
	            }
	        },
	        /**
	         * 设置终点锚
	         */
	        setTargetAnchor: function(anchor) {
	            if (anchor == this.endAnchor) {
	                return;
	            }
	            this.unhookTargetAnchor();
	            this.endAnchor = anchor;
	            if (this.getParent() != null) {
	                this.hookTargetAnchor();
	            }
	            this.revalidate();
	        },
	        /**
	         * 设置终点修饰
	         */
	        setTargetDecoration: function(dec) {
	            if (this.endArrow == dec) {
	                return;
	            }
	            if (this.endArrow != null) {
	                this.remove(this.endArrow);
	            }
	            this.endArrow = dec;
	            if (this.endArrow != null) {
	                this.add(this.endArrow, new ArrowLocator(this, ConnectionLocator.TARGET));
	            }

	        },
	        unhookSourceAnchor: function() {
	            if (this.getSourceAnchor() != null) {
	                this.getSourceAnchor().removeAnchorListener(this);
	            }
	        },
	        unhookTargetAnchor: function() {
	            if (this.getTargetAnchor() != null) {
	                this.getTargetAnchor().removeAnchorListener(this);
	            }
	        }
	    });

	    return PolylineConnection;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 100 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(12),
	    __webpack_require__(20)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Rectangle, Graphics) {
	    'use strict';

	    /**
	     * @class GraphicsSource
	     * @param canvas
	     * @returns
	     */
	    var GraphicsSource = function(canvas) {
	        GraphicsSource.superclass.constructor.call(this);
	        this.control = canvas;

	    };

	    //static properties
	    util.defineClass(GraphicsSource, Object, {

	        flushGraphics: function() {
	            //this.control.context.clearRect(this.inUse.x,this.inUse.y,this.inUse.width,this.inUse.height);
	            //this.control.context.drawImage(this.canvasElement,0,0);
	            //this.control.context.strokeRect(this.inUse.x,this.inUse.y,this.inUse.width,this.inUse.height);
	            //this.control.context.strokeRect(this.inUse.x,this.inUse.y,this.inUse.width,this.inUse.height);
	            this.graphics.dispose();
	        },

	        getGraphics: function(rect) {

	            if (!this.control) {
	                return;
	            }

	            var controlSize = this.control.getSize();
	            this.inUse = new Rectangle(0, 0, controlSize.width, controlSize.height);
	            this.inUse.intersect(rect);

	            if (this.inUse.isEmpty()) {
	                return null;
	            }
	            /*
	            var canvasElement =  document.createElement("canvas");
	            this.canvasElement = canvasElement;
	            canvasElement.width = this.control.getWidth();
	            canvasElement.height = this.control.getHeight();
	            this.context = canvasElement.getContext("2d");
	            var graphics = new Html5Graphics(this.context,new Rectangle(this.inUse.x,this.inUse.y,this.inUse.width,this.inUse.height));
	            */

	            // this.control.context.scale(this.control.scale, this.control.scale);
	            // this.inUse.scale(this.control.scale);
	            // this.inUse.scale(this.control.scale);
	            this.control.context.clearRect(this.inUse.x, this.inUse.y, this.inUse.width, this.inUse.height);
	            var clipRect = new Rectangle(this.inUse.x, this.inUse.y, this.inUse.width, this.inUse.height);

	            this.graphics = new Graphics(this.control.context, clipRect);
	            // this.control.context.scale(this.control.scale, this.control.scale);
	            return this.graphics;
	        }
	    });

	    return GraphicsSource;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 101 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	//ToolTipBorder,LightweightSystem,EventDispatcher三个模块循环依赖
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(102),
	    __webpack_require__(64),
	    __webpack_require__(67),
	    __webpack_require__(112),
	    __webpack_require__(12),
	    __webpack_require__(33),
	    __webpack_require__(100)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    EventDispatcher,
	    RootFigure,
	    StackLayout,
	    EventHandler,
	    Rectangle,
	    UpdateManager,
	    GraphicsSource
	) {
	    'use strict';

	    /**
	     *
	     * @class 轻量级系统
	     * @constructor
	     * @param canvas
	     * @returns
	     */
	    var LightweightSystem = function(canvas) {
	        LightweightSystem.superclass.constructor.call(this);
	        this.manager = this.createUpdateManager();
	        this.ignoreResize = false;
	        this.setRootPaneFigure(this.createRootFigure());
	        this.handler = new EventHandler(this);
	        if (canvas) {
	            this.setControl(canvas);
	        }
	    };

	    //static properties
	    util.defineClass(LightweightSystem, Object, {
	        addListeners: function() {
	            this.canvas.addControllListener(this);
	            this.canvas.addMouseListener(this.handler);
	            if (this.canvas.addTouchListener) {
	                this.canvas.addTouchListener(this.handler);
	            }
	            this.canvas.addKeyListener(this.handler);
	        },
	        controlResized: function() {
	            var r = this.canvas.getClientArea();

	            r.setLocation(0, 0);
	            //canvas大小发生变化的时候，内容会被自动擦掉。此时root的bounds也发生变化，就会触发全部重绘，不会出现问题.
	            //如果canvas被重设的大小跟之前的大小相同，那么root的bounds不会发生变化，内容无法重绘，会出现问题。需要注意。
	            //一定要大小真的变了的时候才能去改变canvas控件的width和height属性。
	            this.root.setBounds(r);
	            this.root.revalidate();
	            this.manager.performUpdate();
	        },

	        createRootFigure: function() {
	            var f = new RootFigure(this);
	            f.addNotify();
	            f.setOpaque(true);
	            f.setLayoutManager(new StackLayout());
	            return f;
	        },
	        getEventDispatcher: function() {
	            if (this.dispatcher == null) {
	                var EventDispatcher = __webpack_require__(102);
	                this.setEventDispatcher(new EventDispatcher());
	            }
	            return this.dispatcher;
	        },
	        getUpdateManager: function() {
	            return this.manager;
	        },
	        paint: function() {
	            this.manager.paint(this.canvas);
	        },
	        performUpdate: function() {
	            this.manager.performUpdate();
	        },
	        setControl: function(canvas) {
	            this.canvas = canvas;

	            this.manager.setGraphicsSource(this.createGraphicsSource(this.canvas));
	            this.getEventDispatcher().setControl(canvas);
	            this.addListeners();

	            var r = new Rectangle(canvas.getClientArea());
	            r.setLocation(0, 0);
	            this.root.setBounds(r);
	            this.root.revalidate();
	        },
	        setContents: function(contents) {
	            if (this.contents) {
	                this.root.remove(this.contents);
	            }
	            this.contents = contents;
	            this.root.add(this.contents);

	        },
	        setEventDispatcher: function(dispatcher) {
	            this.dispatcher = dispatcher;
	            this.dispatcher.setRoot(this.root);
	            this.dispatcher.setControl(this.canvas);
	        },
	        setRootPaneFigure: function(root) {
	            this.manager.setRoot(root);
	            this.root = root;
	        },
	        getRootFigure: function() {
	            return this.root;
	        },
	        createUpdateManager: function() {
	            return new UpdateManager();
	        },
	        createGraphicsSource: function(canvas) {
	            return new GraphicsSource(canvas);
	        },
	        dispose: function() {
	            if (this.dispatcher && this.dispatcher.dispose) {
	                this.dispatcher.dispose();
	            }
	            this.dispatcher = null;
	            if (this.canvas && this.canvas.dispose) {
	                this.canvas.dispose();
	            }
	            this.canvas = null;
	            if (this.manager && this.manager.dispose) {
	                this.manager.dispose();
	            }
	            this.manager = null;

	        }
	    });

	    return LightweightSystem;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 102 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	//ToolTipBorder,LightweightSystem,EventDispatcher三个模块循环依赖
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(110),
	    __webpack_require__(104),
	    __webpack_require__(106),
	    __webpack_require__(107),
	    __webpack_require__(108),
	    __webpack_require__(103),
	    __webpack_require__(111),
	    __webpack_require__(9),
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    KeyEvent,
	    MouseEvent,
	    FocusEvent,
	    Canvas,
	    ToolTipHelper,
	    FocusTraverseManager,
	    Cursor,
	    Point,
	    util
	) {
	    'use strict';

	    /**
	     *
	     * @class 事件分发器
	     * @constructor
	     */
	    var EventDispatcher = function() {
	        EventDispatcher.superclass.constructor.call(this);
	        this.figureTraverse = true;
	        this.captured = false;
	        this.root = null;
	        this.mouseTarget = null;
	        this.cursorTarget = null;
	        this.focusOwner = null;
	        this.hoverSource = null;
	        this.currentEvent = null;
	        this.cursor = null;
	        this.control = null;
	        this.toolTipHelper = null;
	        this.focusManager = new FocusTraverseManager();

	    };


	    //static properties
	    util.defineClass(EventDispatcher, Object, {
	        /**
	         * 获得焦点
	         */
	        dispatchFocusGained: function(e) {
	            var currentFocusOwner = this.getFocusTraverseManager().getCurrentFocusOwner();
	            if (currentFocusOwner == null) {
	                currentFocusOwner = this.getFocusTraverseManager().getNextFocusableFigure(this.root, this.focusOwner);
	            }
	            this.setFocus(currentFocusOwner);
	        },
	        /**
	         * 失去焦点
	         */
	        dispatchFocusLost: function(e) {
	            this.setFocus(null);
	        },
	        /**
	         * 按下一个键
	         */
	        dispatchKeyPressed: function(e) {
	            if (this.focusOwner != null) {
	                //draw2d.KeyEvent
	                var event = new KeyEvent(this, this.focusOwner, e);
	                this.focusOwner.handleKeyPressed(event);
	            }
	        },
	        /**
	         * 放开一个键
	         */
	        dispatchKeyReleased: function(e) {
	            if (this.focusOwner != null) {
	                //draw2d.KeyEvent
	                var event = new KeyEvent(this, this.focusOwner, e);
	                this.focusOwner.handleKeyReleased(event);
	            }
	        },
	        /**
	         *
	         */
	        dispatchKeyDown: function(e) {
	            if (this.focusOwner != null) {
	                //draw2d.KeyEvent
	                var event = new KeyEvent(this, this.focusOwner, e);
	                this.focusOwner.handleKeyPressed(event);
	            }
	        },
	        dispatchMouseWheelScrolled: function(e) {

	        },
	        //遍历事件，如tab和shift+tab
	        dispatchKeyTraversed: function(e) {

	        },
	        dispatchMouseHover: function(me) {
	            this.receive(me);
	            if (this.mouseTarget != null) {
	                this.mouseTarget.handleMouseHover(this.currentEvent);
	            }
	            if (this.hoverSource != null) {
	                this.toolTipHelper = this.getToolTipHelper();
	                var tip = this.hoverSource.getToolTip();
	                var control = me.getSource();
	                var absolute = control.toDisplay(new Point(me.x, me.y));
	                this.toolTipHelper.displayToolTipNear(this.hoverSource, tip, absolute.x, absolute.y);
	            }
	        },
	        /**
	         * 鼠标双击
	         */
	        dispatchMouseDoubleClicked: function(me) {
	            this.receive(me);
	            if (this.mouseTarget != null) {

	                this.mouseTarget.handleMouseDoubleClicked(this.currentEvent);
	            }
	        },
	        /**
	         * 鼠标单击
	         */
	        dispatchMouseClicked: function(me) {
	            this.receive(me);
	            if (this.mouseTarget != null) {

	                this.mouseTarget.handleMouseClicked(this.currentEvent);
	            }
	        },
	        /**
	         * 鼠标进入
	         */
	        dispatchMouseEntered: function(me) {
	            this.receive(me);
	        },
	        /**
	         * 鼠标移出
	         */
	        dispatchMouseExited: function(me) {
	            this.setHoverSource(null, me);
	            if (this.mouseTarget != null) {
	                this.currentEvent = new MouseEvent(me.x, me.y, this, this.mouseTarget, me.button, me.stateMask, me);
	                this.mouseTarget.handleMouseExited(this.currentEvent);
	                this.releaseCapture();
	                this.mouseTarget = null;
	            }
	        },
	        /**
	         * 鼠标按下
	         */
	        dispatchMousePressed: function(me) {
	            this.receive(me);
	            if (this.mouseTarget != null) {
	                this.mouseTarget.handleMousePressed(this.currentEvent);
	                if (this.currentEvent.isConsumed()) {
	                    this.setCapture(this.mouseTarget);
	                }
	            }
	        },
	        /**
	         * 鼠标移动
	         */
	        dispatchMouseMoved: function(me) {
	            this.receive(me);
	            if (this.mouseTarget != null) {
	                if (me.button == Canvas.BUTTON_LEFT) {
	                    this.mouseTarget.handleMouseDragged(this.currentEvent);
	                    //强制刷新
	                    //						var parent = this.mouseTarget;
	                    //						while(parent.parent != null){
	                    //							parent = parent.parent;
	                    //						}
	                    //						if(parent.lws != null){
	                    //							//setTimeout(function(){parent.lws.performUpdate()}); //延迟重绘，以减少重绘次数
	                    //							//parent.lws.performUpdate();
	                    //						}
	                    //强制刷新
	                } else {
	                    this.mouseTarget.handleMouseMoved(this.currentEvent);
	                }

	            }
	        },
	        /**
	         * 鼠标松开
	         */
	        dispatchMouseReleased: function(me) {
	            this.receive(me);
	            if (this.mouseTarget != null) {
	                this.mouseTarget.handleMouseReleased(this.currentEvent);
	            }
	            this.releaseCapture();
	            this.receive(me);
	        },
	        /**
	         * 触摸开始
	         */
	        dispatchTouchStart: function(me) {
	            //todo
	        },
	        /**
	         * 触摸移动
	         */
	        dispatchTouchMove: function(me) {
	            //todo
	        },
	        /**
	         * 触摸结束
	         */
	        dispatchTouchEnd: function(me) {
	            //todo
	        },
	        /**
	         * 得到当前事件
	         */
	        getCurrentEvent: function() {
	            return this.currentEvent;
	        },
	        getCurrentToolTip: function() {
	            if (this.hoverSource != null) {
	                return this.hoverSource.getToolTip();
	            } else {
	                return null;
	            }
	        },
	        /**
	         * 得到当前光标目标
	         */
	        getCursorTarget: function() {
	            return this.cursorTarget;
	        },
	        getToolTipHelper: function() {
	            if (this.toolTipHelper == null) {
	                var ToolTipHelper = __webpack_require__(108);
	                this.toolTipHelper = new ToolTipHelper(this.control);
	            }
	            return this.toolTipHelper;
	        },
	        getFocusTraverseManager: function() {
	            if (this.focusManager == null) {
	                this.focusManager = new FocusTraverseManager();
	            }
	            return this.focusManager;
	        },
	        /**
	         * 得到焦点拥有者
	         */
	        getFocusOwner: function() {
	            return this.focusOwner;
	        },
	        /**
	         * 得到当前鼠标目标
	         * @type Figure
	         */
	        getMouseTarget: function() {
	            return this.mouseTarget;
	        },
	        /**
	         * 得到根图形
	         * @type Figure
	         */
	        getRoot: function() {
	            return this.root;
	        },
	        /**
	         *
	         */
	        isCaptured: function() {
	            return this.captured;
	        },
	        receive: function(me) {
	            this.currentEvent = null;
	            this.updateFigureUnderCursor(me);
	            var state = me.stateMask;
	            if (this.captured) {
	                if (this.mouseTarget != null) {
	                    //draw2d.MouseEvent
	                    this.currentEvent = new MouseEvent(me.x, me.y, this, this.mouseTarget, me.button, state, me);
	                }
	            } else {
	                var f = this.mouseTarget;
	                //if(!(me.button == Canvas.BUTTON_LEFT && me.type == "mousemove")){ //在拖拽状态下不进行目标的切换
	                f = this.root.findMouseEventTargetAt(me.x, me.y);
	                //}
	                if (f == this.mouseTarget) {
	                    if (this.mouseTarget != null) {
	                        this.currentEvent = new MouseEvent(me.x, me.y, this, this.mouseTarget, me.button, state, me);
	                    }
	                    return;
	                }
	                if (this.mouseTarget != null) {
	                    this.currentEvent = new MouseEvent(me.x, me.y, this, this.mouseTarget, me.button, state, me);
	                    this.mouseTarget.handleMouseExited(this.currentEvent);
	                }
	                this.setMouseTarget(f);
	                if (this.mouseTarget != null) {
	                    this.currentEvent = new MouseEvent(me.x, me.y, this, this.mouseTarget, me.button, state, me);
	                    this.mouseTarget.handleMouseEntered(this.currentEvent);
	                }
	            }
	        },
	        releaseCapture: function() {
	            this.captured = false;
	        },
	        /**
	         *
	         */
	        requestFocus: function(fig) {
	            this.setFocus(fig);
	        },
	        /**
	         *
	         */
	        requestRemoveFocus: function(fig) {
	            if (this.getFocusOwner() == fig) {
	                this.setFocus(null);
	            }
	            if (this.mouseTarget == fig) {
	                this.mouseTarget = null;
	            }
	            if (this.cursorTarget == fig) {
	                this.cursorTarget = null;
	            }
	            if (this.hoverSource == fig) {
	                this.hoverSource = null;
	            }
	            this.getFocusTraverseManager().setCurrentFocusOwner(null);
	        },
	        setCapture: function(figure) {
	            this.captured = true;
	            this.mouseTarget = figure;
	        },
	        /**
	         * 设置控件
	         */
	        setControl: function(c) {
	            if (c == this.control) {
	                return;
	            }
	            if (this.control != null && !this.control.isDisposed()) {
	                throw ("EventDispatcher--setControl--Can not set control again once it has been set");
	            }
	            var that = this;
	            if (c != null) {
	                c.addDisposeListener({
	                    widgetDisposed: function() {
	                        if (that.toolTipHelper != null) {
	                            that.toolTipHelper.dispose();
	                        }
	                    }
	                });
	            }
	            this.control = c;
	        },
	        setCursor: function(c) {
	            if (c == null && this.cursor == null) {
	                return;
	            } else if (c != this.cursor) {
	                this.cursor = c;
	                if (this.control != null && !this.control.isDisposed()) {
	                    this.control.setCursor(c);
	                }
	            }
	        },
	        /**
	         *
	         */
	        setEnableKeyTraversal: function(traverse) {
	            this.figureTraverse = traverse;
	        },
	        setFigureUnderCursor: function(f) {
	            if (this.cursorTarget == f) {
	                return;
	            }
	            this.cursorTarget = f;
	            this.updateCursor();
	        },
	        setFocus: function(fig) {
	            if (fig == this.focusOwner) {
	                return;
	            }
	            //draw2d.FocusEvent
	            var fe = new FocusEvent(this.focusOwner, fig);
	            var oldOwner = this.focusOwner;
	            this.focusOwner = fig;
	            if (oldOwner != null) {
	                oldOwner.handleFocusLost(fe);
	            }
	            if (fig != null) {
	                this.getFocusTraverseManager().setCurrentFocusOwner(fig);
	            }
	            if (this.focusOwner != null) {
	                this.focusOwner.handleFocusGained(fe);
	            }
	        },
	        setHoverSource: function(figure, me) {
	            this.hoverSource = figure;
	            if (figure != null) {
	                var control = me.getSource();
	                var absolute = control.toDisplay(new Point(me.x, me.y));
	                this.toolTipHelper = this.getToolTipHelper();
	                this.toolTipHelper.updateToolTip(this.hoverSource, this.getCurrentToolTip(), absolute.x, absolute.y);
	            } else if (this.toolTipHelper != null) {
	                this.toolTipHelper.updateToolTip(this.hoverSource, this.getCurrentToolTip(), me.x, me.y);
	            }
	        },
	        setMouseTarget: function(figure) {
	            this.mouseTarget = figure;
	        },
	        /**
	         * 设置根
	         * @param {Figure} figure
	         */
	        setRoot: function(figure) {
	            this.root = figure;
	        },
	        updateCursor: function() {
	            var newCursor = null;
	            if (this.cursorTarget != null) {
	                newCursor = this.cursorTarget.getCursor();
	            }
	            if (newCursor == null) {
	                newCursor = Cursor.DEFAULT;
	            }
	            this.setCursor(newCursor);
	        },
	        updateFigureUnderCursor: function(me) {
	            if (!this.captured) {
	                var f = this.root.findFigureAt(me.x, me.y);
	                this.setFigureUnderCursor(f);
	                if (this.cursorTarget != this.hoverSource) {
	                    this.updateHoverSource(me);
	                }
	            }
	        },
	        updateHoverSource: function(me) {
	            if (this.cursorTarget != null) {
	                var sourceFound = false;
	                var source = this.cursorTarget;
	                while (!sourceFound && source.getParent() != null) {
	                    if (source.getToolTip() != null) {
	                        sourceFound = true;
	                    } else {
	                        source = source.getParent();
	                    }
	                }
	                this.setHoverSource(source, me);
	            } else {
	                this.setHoverSource(null, me);
	            }
	        }
	    });

	    return EventDispatcher;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 103 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    var FocusTraverseManager = function() {
	        FocusTraverseManager.superclass.constructor.call(this);

	    };

	    //static properties
	    util.defineClass(FocusTraverseManager, Object, {
	        findDeepestRightmostChildOf: function(fig) {
	            while (fig.getChildren().length != 0) {
	                fig = fig.getChildren().get(fig.getChildren().length - 1);
	            }
	            return fig;
	        },
	        getNextFocusableFigure: function(root, prevFocus) {
	            var found = false;
	            var nextFocus = prevFocus;
	            if (prevFocus == null) {
	                if (root.getChildren().length != 0) {
	                    nextFocus = (root.getChildren())[0];
	                    if (this.isFocusEligible(nextFocus)) {
	                        return nextFocus;
	                    }
	                } else {
	                    return null;
	                }
	            }
	            var siblingPos = util.Array.indexOf(nextFocus.getParent().getChildren(), nextFocus);
	            while (!found) {
	                var parent = nextFocus.getParent();
	                var siblings = parent.getChildren();
	                if (nextFocus.getChildren().length != 0) {
	                    nextFocus = nextFocus.getChildren().get(0);
	                    siblingPos = 0;
	                    if (this.isFocusEligible(nextFocus)) {
	                        found = true;
	                    }
	                } else if (siblingPos < siblings.length - 1) {
	                    nextFocus = siblings.get(++siblingPos);
	                    if (this.isFocusEligible(nextFocus)) {
	                        found = true;
	                    }
	                } else {
	                    var untraversedSiblingFound = false;
	                    while (!untraversedSiblingFound) {
	                        var p = nextFocus.getParent();
	                        var gp = p.getParent();
	                        if (gp != null) {
	                            var parentSiblingCount = gp.getChildren().length;
	                            var parentIndex = util.Array.indexOf(gp.getChildren(), p);
	                            if (parentIndex < parentSiblingCount - 1) {
	                                nextFocus = p.getParent().getChildren().get(parentIndex + 1);
	                                siblingPos = parentIndex + 1;
	                                untraversedSiblingFound = true;
	                                if (this.isFocusEligible(nextFocus)) {
	                                    found = true;
	                                }
	                            } else {
	                                nextFocus = p;
	                            }
	                        } else {
	                            nextFocus = null;
	                            untraversedSiblingFound = true;
	                            found = true;
	                        }
	                    }
	                }
	            }
	            return nextFocus;
	        },
	        getPreviousFocusableFigure: function(root, prevFocus) {
	            if (prevFocus == null) {
	                return null;
	            }
	            var found = false;
	            var nextFocus = prevFocus;
	            while (!found) {
	                var parent = nextFocus.getParent();
	                if (parent == null) {
	                    return null;
	                }
	                var siblings = parent.getChildren();
	                var siblingPos = util.Array.indexOf(siblings, nextFocus);
	                if (siblingPos != 0) {
	                    var child = this.findDeepestRightmostChildOf(siblings.get(siblingPos - 1));
	                    if (this.isFocusEligible(child)) {
	                        found = true;
	                        nextFocus = child;
	                    } else if (child.equals(nextFocus)) {
	                        if (this.isFocusEligible(nextFocus)) {
	                            found = true;
	                        }
	                    } else {
	                        nextFocus = child;
	                    }
	                } else {
	                    nextFocus = parent;
	                    if (this.isFocusEligible(nextFocus)) {
	                        found = true;
	                    }
	                }
	            }
	            return nextFocus;
	        },
	        getCurrentFocusOwner: function() {
	            return this.currentFocusOwner;
	        },
	        isFocusEligible: function(fig) {
	            return (fig != null && fig.isFocusTraversable() && fig.isShowing());
	        },
	        setCurrentFocusOwner: function(fig) {
	            this.currentFocusOwner = fig;
	        }
	    });

	    return FocusTraverseManager;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 104 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	//从event.js中拆分出来
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(9),
	    __webpack_require__(105)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Point, InputEvent) {
	    'use strict';

	    var MouseEvent = function(x, y, dispatcher, f, button, stateMask, me) {
	        MouseEvent.superclass.constructor.call(this, dispatcher, f, stateMask);
	        var pt = Point.SINGLETON;
	        pt.setLocation(x, y);
	        f.translateToRelative(pt);
	        this.button = button;
	        this.x = pt.x;
	        this.y = pt.y;
	        if (me) {
	            this.e = me.e;
	        }
	    };
	    util.defineClass(MouseEvent, InputEvent, {
	        getLocation: function() {
	            return new Point(this.x, this.y);
	        }
	    });

	    return MouseEvent;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 105 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	//从event.js中拆分出来
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    var InputEvent = function(dispatcher, source, state) {
	        this.source = source;
	        this.state = state;
	        this.consumed = false;
	    };

	    InputEvent.ALT = 1 << 16;
	    InputEvent.SHIFT = 1 << 17;
	    InputEvent.CTRL = 1 << 18;
	    InputEvent.BUTTON1 = 1 << 19;
	    InputEvent.BUTTON2 = 1 << 20;
	    InputEvent.BUTTON3 = 1 << 21;
	    InputEvent.BUTTON4 = 1 << 23;
	    InputEvent.BUTTON5 = 1 << 25;
	    InputEvent.BUTTON_MASK = InputEvent.BUTTON1 | InputEvent.BUTTON2 | InputEvent.BUTTON3 | InputEvent.BUTTON4 | InputEvent.BUTTON5;

	    //static properties
	    util.defineClass(InputEvent, Object, {
	        consume: function() {
	            this.consumed = true;
	        },
	        getSource: function() {
	            return this.source;
	        },
	        getState: function() {
	            return this.state;
	        },
	        isConsumed: function() {
	            return this.consumed;
	        }
	    });

	    return InputEvent;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 106 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	//从event.js中拆分出来
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require) {
	    'use strict';

	    var FocusEvent = function(loser, gainer) {
	        this.loser = loser;
	        this.gainer = gainer;
	    };

	    return FocusEvent;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 107 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-8
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(12),
	    __webpack_require__(10),
	    __webpack_require__(9),
	    __webpack_require__(8)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Rectangle, Dimension, Point, Html5Event) {
	    'use strict';

	    var Canvas = function(element) {
	        Canvas.superclass.constructor.call(this);

	        this.canvasElement = element;
	        this.context = this.canvasElement.getContext("2d");
	        this.controllListeners = [];
	        this.mouseListeners = [];
	        this.keyListeners = [];
	        this.disposeListeners = [];
	        this.registerEvent();
	        this.button = Canvas.BUTTON_NONE;
	        this.stateMask = 0;
	        this.scale = util.Screen.scaleFactor;
	    };

	    Canvas.BUTTON_NONE = 0;
	    Canvas.BUTTON_LEFT = 1;
	    Canvas.BUTTON_CENTER = 4;
	    Canvas.BUTTON_RIGHT = 2;
	    Canvas.HOVER_TIME = 800;

	    //static properties
	    util.defineClass(Canvas, Object, {
	        /**
	         * 添加控件监听器
	         */
	        addControllListener: function(listener) {
	            if (listener == null) {
	                return;
	            }
	            this.controllListeners.push(listener);
	        },
	        /**
	         * 添加鼠标监听器
	         */
	        addMouseListener: function(listener) {
	            if (listener == null) {
	                return;
	            }
	            this.mouseListeners.push(listener);
	        },
	        /**
	         * 添加按键监听器
	         */
	        addKeyListener: function(listener) {
	            if (listener == null) {
	                return;
	            }
	            this.keyListeners.push(listener);
	        },
	        /**
	         * 添加销毁监听器
	         */
	        addDisposeListener: function(listener) {
	            if (listener == null) {
	                return;
	            }
	            this.disposeListeners.push(listener);
	        },
	        /**
	         * 得到2d绘图上下文
	         */
	        get2dContext: function() {
	            return this.canvasElement.getContext("2d");
	        },
	        /**
	         * 得到控件的客户区
	         */
	        getClientArea: function() {
	            return new Rectangle(0, 0, this.getWidth(), this.getHeight());
	        },
	        /**
	         * 得到高度
	         */
	        getHeight: function() {
	            return this.canvasElement.height / this.scale;
	        },
	        /**
	         * 得到大小
	         */
	        getSize: function() {
	            return new Dimension(this.getWidth(), this.getHeight());
	        },
	        /**
	         * 得到宽度
	         */
	        getWidth: function() {
	            return this.canvasElement.width / this.scale;
	        },
	        getClipping: function() {
	            return new Rectangle(0, 0, this.getWidth(), this.getHeight());
	        },

	        open: function() {
	            var i;
	            for (i = 0; i < this.controllListeners.length; i++) {
	                this.controllListeners[i].controlResized();
	            }
	        },
	        dispose: function() {
	            //dispose self
	            //fire dispose
	            var i;
	            for (i = 0; i < this.disposeListeners.length; i++) {
	                this.disposeListeners[i].widgetDisposed();
	            }
	        },
	        registerEvent: function() {

	            var canvas = this;

	            function addEvent(el, type, fn) {
	                (el.attachEvent) ? (el.attachEvent("on" + type, fn)) : (el.addEventListener(type, fn, false));
	            }
	            //捕获键盘事件
	            addEvent(this.canvasElement, "keypress", function(e) { //按下并释放某个键
	                canvas.keyPressed(e);
	            });
	            addEvent(this.canvasElement, "keyup", function(e) { //释放某个键
	                canvas.keyReleased(e);
	            });
	            addEvent(this.canvasElement, "keydown", function(e) { //按下某个键
	                canvas.keyDown(e);
	            });

	            addEvent(this.canvasElement, "dblclick", function(e) { //双击 每次双击前会出发两对按下和释放
	                if (canvas.clickTimer != null) {
	                    for (var i = 0; i < canvas.clickTimer.length; i++) {
	                        clearTimeout(canvas.clickTimer[i]);
	                    }
	                    canvas.clickTimer = [];
	                }
	                canvas.mouseDoubleClick(e);
	            });

	            addEvent(this.canvasElement, "click", function(e) { //单击
	                //延迟处理以解决每次双击触发的单击事件
	                if (canvas.clickTimer == null) {
	                    canvas.clickTimer = [];
	                }
	                var event = canvas.parse(e);
	                canvas.clickTimer.push(setTimeout(function() {
	                    canvas._fireMouseEvent("click", event);
	                }, 250));
	            });

	            addEvent(this.canvasElement, "selectstart", function(e) { //防止在chrome下拖拽时的鼠标样式设置无效
	                if (e.preventDefault) {
	                    e.preventDefault();
	                } else {
	                    e.returnValue = false;
	                }
	                if (e.stopPropagation) {
	                    e.stopPropagation();
	                }
	            });
	            addEvent(this.canvasElement, "mousedown", function(e) { //鼠标按下
	                canvas._clearMouseHover(e);
	                canvas.mouseDown(e);
	            });

	            addEvent(this.canvasElement, "mouseout", function(e) { //鼠标移出canvas
	                canvas._clearMouseHover(e);
	                canvas.mouseExit(e);
	            });

	            addEvent(this.canvasElement, "mouseover", function(e) { //鼠标进入canvas
	                //canvas.mouseHover(e);
	            });

	            addEvent(this.canvasElement, "mousemove", function(e) { //鼠标在canvas内移动
	                canvas._resetMouseHover(e);
	                canvas.mouseMove(e);
	            });

	            addEvent(this.canvasElement, "mouseup", function(e) { //鼠标释放
	                canvas._resetMouseHover(e);
	                canvas.mouseUp(e);
	            });
	        },

	        /**
	         * 重置悬停事件
	         * @private
	         *
	         */
	        _resetMouseHover: function(e) {
	            this._clearMouseHover();
	            this._beginMouseHover(e);
	        },
	        _beginMouseHover: function(e) {
	            var that = this;
	            var event = this.parse(e);
	            this.hoverTimer = setTimeout(function() {
	                    that._fireMouseEvent('mouseHover', event);
	                },
	                Canvas.HOVER_TIME);
	        },
	        _clearMouseHover: function() {
	            if (this.hoverTimer) {
	                clearTimeout(this.hoverTimer);
	            }
	        },

	        //key
	        keyPressed: function(event) {
	            for (var i = 0; i < this.keyListeners.length; i++) {
	                this.keyListeners[i].keyPressed(event);
	            }
	        },
	        keyDown: function(event) {
	            for (var i = 0; i < this.keyListeners.length; i++) {
	                this.keyListeners[i].keyDown(event);
	            }
	        },
	        keyReleased: function(event) {
	            for (var i = 0; i < this.keyListeners.length; i++) {
	                this.keyListeners[i].keyReleased(event);
	            }
	        },
	        //mouse
	        /*
	        getEvLocation = function(ev){
	        	var mx,my;
	        	if(ev.layerX || ev.layerX==0){
	        		mx = ev.layerX;
	        		my = ev.layerY;
	        	}else if(ev.offsetX || ev.offsetY ==0){
	        		mx = ev.offsetX;
	        		my = ev.offsetY;
	        	}
	        	return new Point(mx,my);
	        }
	        */
	        getEvLocation: function(e) {
	            var x = 0;
	            var y = 0;
	            var target = e.target || e.srcElement;
	            if (util.browser.ie /*IE*/ || util.browser.wk /*webkit*/ ) {
	                //offsetX和offsetY是事件相对于当前元素的位置
	                x = e.offsetX;
	                y = e.offsetY;
	            } else { //FF
	                //layerX和layerY是事件相对于当前坐标系的位置
	                x = e.layerX;
	                y = e.layerY;
	                while (target.offsetParent && target.style.position != 'absolute' && target.style.position != 'relative') {
	                    target = target.offsetParent;
	                }
	            }
	            x += target.offsetLeft;
	            y += target.offsetTop;

	            var current = target;
	            while (current != null && current != this.canvasElement) {
	                current = current.offsetParent;
	                x += current.offsetLeft;
	                y += current.offsetTop;
	            }
	            return new Point(x, y);
	        },
	        parse: function(e) {
	            var p = this.getEvLocation(e);
	            var event = new Html5Event(this);
	            event.setLocation(p);
	            event.stateMask = this.stateMask;
	            event.localX = p.x;
	            event.localY = p.y;
	            event.type = e.type;
	            event.button = this.getMouseButton(e);
	            event.altKey = e.altKey;
	            event.ctrlKey = e.ctrlKey;
	            event.shiftKey = e.shiftKey;
	            return event;
	        },
	        //兼容chrome25,ff18,ie10
	        getMouseButton: function(e) {
	            if (util.browser.ff) { //firefox
	                return e.buttons;
	            } else if (util.browser.ie) { //ie
	                return e.button;
	            } else if (util.browser.wk) { //chrome
	                if (e.which === 1) {
	                    return Canvas.BUTTON_LEFT;
	                } else if (e.which === 2) {
	                    return Canvas.BUTTON_CENTER;
	                } else if (e.which === 3) {
	                    return Canvas.BUTTON_RIGHT;
	                }
	            }
	            return Canvas.BUTTON_NONE;
	        },
	        mouseDoubleClick: function(e) {
	            var event = this.parse(e);
	            for (var i = 0; i < this.mouseListeners.length; i++) {
	                this.mouseListeners[i].mouseDoubleClick(event);
	            }
	        },
	        mouseDown: function(e) {
	            var event = this.parse(e);
	            for (var i = 0; i < this.mouseListeners.length; i++) {

	                this.mouseListeners[i].mouseDown(event);
	            }
	        },
	        click: function(e) {
	            var event = this.parse(e);
	            this._fireMouseEvent("click", event);
	        },
	        _fireMouseEvent: function(type, event) {
	            // try {
	            var listener;
	            for (var i = 0; i < this.mouseListeners.length; i++) {
	                listener = this.mouseListeners[i];
	                if (listener[type]) {
	                    listener[type](event);
	                }
	            }
	            // } catch (e) {
	            // 		Debugger.error(e);
	            // }
	        },
	        mouseExit: function(e) {
	            //do nothing
	            return;
	            //				因为在鼠标移出之后再移进去时，已经无法判断出鼠标是按下还是弹起。所以此处能将状态改为弹起
	            //				this.button = Canvas.BUTTON_NONE;
	            var event = this.parse(e);
	            for (var i = 0; i < this.mouseListeners.length; i++) {
	                this.mouseListeners[i].mouseExit(event);
	            }
	        },
	        mouseHover: function(e) {
	            var event = this.parse(e);
	            for (var i = 0; i < this.mouseListeners.length; i++) {
	                this.mouseListeners[i].mouseHover(event);
	            }
	        },
	        mouseMove: function(e) {
	            var event = this.parse(e);

	            for (var i = 0; i < this.mouseListeners.length; i++) {
	                this.mouseListeners[i].mouseMove(event);
	            }
	        },
	        mouseUp: function(e) {
	            //				return;

	            var event = this.parse(e);
	            event.button = Canvas.BUTTON_LEFT;
	            for (var i = 0; i < this.mouseListeners.length; i++) {
	                this.mouseListeners[i].mouseUp(event);
	            }
	        },
	        toDisplay: function(arg1, arg2) {
	            //此处直接返回原坐标
	            if (arg1 == null) {
	                return;
	            }
	            if (util.isInstanceOf(arg1, Point)) {
	                return arg1;
	            } else {
	                return new Point(arg1, arg2);
	            }
	        },

	        /**
	         * 重设大小
	         */
	        resize: function(w, h) {
	            this.canvasElement.style.width = w + 'px';
	            this.canvasElement.style.height = h + 'px';
	            this.canvasElement.width = w * this.scale;
	            this.canvasElement.height = h * this.scale;
	            //使得canvas可以被选中(支持键盘事件)
	            this.canvasElement.tabIndex = 0;
	            //让canvas在永远下不要显示边框，否则浏览器默认选中状态会显示边框
	            this.canvasElement.style.outline = 'none';
	            for (var i = 0; i < this.controllListeners.length; i++) {
	                this.controllListeners[i].controlResized();
	            }

	            this.context.scale(this.scale, this.scale);
	        },
	        /**
	         * 是否已销毁
	         */
	        isDisposed: function() {
	            return this.canvasElement == null;
	        },
	        /**
	         * 设置鼠标样式
	         * <a href="Cursor.html">Cursor</a>
	         */
	        setCursor: function(cursor) {
	            this.canvasElement.style.cursor = cursor;
	        },
	        //得到父容器
	        getParent: function() {
	            return this.canvasElement.parentNode;
	        }
	    });

	    return Canvas;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 108 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	//ToolTipBorder,LightweightSystem,EventDispatcher三个模块循环依赖
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(11),
	    __webpack_require__(12),
	    __webpack_require__(46),
	    __webpack_require__(107),
	    __webpack_require__(101),
	    __webpack_require__(25),
	    __webpack_require__(109),
	    __webpack_require__(75)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    PositionConstants,
	    Rectangle,
	    Label,
	    Canvas,
	    LightweightSystem,
	    Figure,
	    ToolTipBorder,
	    XYLayout
	) {
	    'use strict';

	    var ToolTipHelper = function(originCanvas) {
	        ToolTipHelper.superclass.constructor.call(this);
	        if (originCanvas == null) {
	            Debugger.error('no control for toopTipHelper');
	        } else {
	            this.originCanvas = originCanvas;
	        }

	    };

	    //static properties

	    ToolTipHelper.SHADOW_X = 4;
	    ToolTipHelper.SHADOW_Y = 4;
	    ToolTipHelper.ANIMATION = 50;

	    util.defineClass(ToolTipHelper, Object, {
	        isShowing: function() {
	            return this.tipShowing;
	        },
	        hide: function() {
	            this.control.style.display = 'none';
	            this.control.style.opacity = 0;
	            this.tipShowing = false;
	        },
	        show: function() {
	            this.control.style.display = 'block';
	            this.tipShowing = true;
	            var helper = this;
	            var step = ToolTipHelper.ANIMATION / 10;
	            var delta = step;

	            var timer = setInterval(function() {
	                if (delta < ToolTipHelper.ANIMATION) {
	                    if (helper.directionY == PositionConstants.NORTH) {
	                        helper.control.style.top = (helper.originTop - delta) + 'px';
	                    } else {
	                        helper.control.style.top = (helper.originTop + delta) + 'px';
	                    }
	                    delta += step;
	                    //淡入
	                    helper.control.style.opacity = (delta / ToolTipHelper.ANIMATION);
	                } else {
	                    clearInterval(timer);
	                }
	            }, 50);
	        },
	        /**
	         * 更新ToolTip
	         */
	        updateToolTip: function(figureUnderMouse, tip, x, y) {
	            if (figureUnderMouse == null) {
	                if (this.isShowing()) {
	                    this.hide();
	                }
	            }
	            if (this.isShowing() && figureUnderMouse != this.currentTipSource) {
	                this.hide();
	                //this.displayToolTipNear(figureUnderMouse, tip, x, y);
	            } else if (!this.isShowing() && figureUnderMouse != this.currentTipSource) {
	                this.currentTipSource = null;
	            }
	        },
	        /**
	         * 显示ToolTip
	         */
	        displayToolTipNear: function(hoverSource, tip, x, y) {
	            if (tip != null && hoverSource != this.currentTipSource) {
	                //如果toolTip只是一个字符串，则新建一个Label
	                if (typeof tip === 'string') {
	                    tip = new Label('toolTip', tip);
	                }
	                if (this.tip != null) {
	                    this.panel.remove(this.tip);
	                }
	                if (this.control == null) {
	                    this.createControl();
	                }
	                this.panel.add(tip, new Rectangle(0, 0, -1, -1));
	                var size = this.panel.getPreferredSize(-1, -1);
	                //调整提示框的位置


	                if (x + size.width > parseInt(this.originCanvas.getWidth())) {
	                    x = x - size.width + ToolTipBorder.WEIGHT / 2;
	                    this.directionX = PositionConstants.EAST;
	                } else {
	                    this.directionX = PositionConstants.WEST;
	                }
	                if (y + size.height > parseInt(this.originCanvas.getHeight())) {
	                    y = y - size.height - ToolTipHelper.ANIMATION;
	                    this.directionY = PositionConstants.SOUTH;
	                } else {
	                    this.directionY = PositionConstants.NORTH;
	                    y = (y + 26 + ToolTipHelper.SHADOW_Y + ToolTipHelper.ANIMATION);
	                }
	                //如果内容太少造成提示框过小，显示会出现问题，所以对过小提示框进行调整
	                if (size.width < ToolTipBorder.WEIGHT * 4) {
	                    size.width = ToolTipBorder.WEIGHT * 4;
	                }
	                //设置ToolTipBorder的箭头方向
	                this.panel.getBorder().setDirection(this.directionX, this.directionY);
	                this.panel.repaint();
	                //记录y值，动画需要使用
	                this.originTop = y;
	                this.resizeToolTip(x, y, size.width, size.height);

	                this.tip = tip;
	                this.currentTipSource = hoverSource;
	                this.show();
	            }
	        },
	        resizeToolTip: function(x, y, width, height) {
	            this.control.style.left = x + 'px';
	            this.control.style.top = y + 'px';
	            if (this.control.width != width || this.control.height != height) {
	                this.control.width = width;
	                this.control.height = height;
	            }
	            //此处只是用来触发更新部分的重绘
	            this.lightweightSystem.controlResized();
	        },
	        createControl: function() {
	            this.control = document.createElement('canvas');
	            this.control.style.display = 'none';
	            this.control.style.position = 'absolute';
	            this.control.style.zIndex = 99;
	            //初始透明度为0
	            this.control.style.opacity = 0;
	            //this.control.style.boxShadow='10px 10px 25px #ccc';

	            var canvas = new Canvas(this.control);
	            //初始化轻量级系统
	            var LightweightSystem = __webpack_require__(101);
	            this.lightweightSystem = new LightweightSystem(canvas);
	            //为轻量级系统设置类容
	            this.panel = new Figure("panel");
	            this.panel.setBorder(new ToolTipBorder());
	            this.panel.setLayoutManager(new XYLayout());
	            this.lightweightSystem.setContents(this.panel);
	            this.originCanvas.getParent().appendChild(this.control);
	        }
	    });

	    return ToolTipHelper;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 109 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(21),
	    __webpack_require__(24),
	    __webpack_require__(23),
	    __webpack_require__(11),
	    __webpack_require__(13)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Color, AbstractBackground, AbstractBorder, PositionConstants, Insets) {
	    'use strict';

	    var ToolTipBorder = function(color, fillColor) {
	        ToolTipBorder.superclass.constructor.call(this);
	        if (color) {
	            this.color = color;
	        } else {
	            this.color = ToolTipBorder.BG_BORDER_COLOR;
	        }
	        if (fillColor) {
	            this.fillColor = fillColor;
	        } else {
	            this.fillColor = ToolTipBorder.BG_FILL_COLOR;
	        }

	    };

	    //static properties

	    ToolTipBorder.WEIGHT = 20;
	    ToolTipBorder.MinWidth = 20;
	    ToolTipBorder.BG_BORDER_COLOR = Color.parse('#662266');
	    ToolTipBorder.BG_FILL_COLOR = new Color(255, 200, 0);

	    util.defineClass(ToolTipBorder, AbstractBackground, {
	        /**
	         * 获取线宽
	         * @type Number
	         */
	        getWidth: function() {
	            return 1;
	        },
	        /**
	         * 设置线条颜色
	         * @param {Color} color 线条颜色
	         */
	        setColor: function(color) {
	            this.color = color;
	        },
	        /**
	         * 获取线条颜色
	         * @type Color
	         */
	        getColor: function() {
	            return this.color;
	        },
	        /**
	         * 设置填充颜色
	         * @param {Color} color 填充颜色
	         */
	        setFillColor: function(fillColor) {
	            this.fillColor = fillColor;
	        },
	        /**
	         * 获取填充颜色
	         * @type Color
	         */
	        getFillColor: function() {
	            return this.fillColor;
	        },
	        /**
	         * 设置箭头的方向,directionX表示箭头在矩形的东还是西，directionY表示箭头在矩形的南还是北
	         */
	        setDirection: function(directionX, directionY) {
	            this.directionX = directionX;
	            this.directionY = directionY;
	        },
	        paintBackground: function(figure, graphics, insets) {

	            AbstractBorder.tempRect.setBounds(this.getPaintRectangle(figure, insets));
	            if (this.getWidth() % 2 == 1) {
	                AbstractBorder.tempRect.width--;
	                AbstractBorder.tempRect.height--;
	            }
	            AbstractBorder.tempRect.shrink(this.getWidth() / 2, this.getWidth() / 2);
	            var insets = this.getInsets();
	            insets = new Insets(insets.top / 2, insets.left / 2, insets.bottom / 2, insets.right / 2);
	            AbstractBorder.tempRect.crop(insets);

	            var temp = AbstractBorder.tempRect;

	            var x = temp.x,
	                y = temp.y,
	                width = temp.width,
	                height = temp.height,
	                horiRadius = 4,
	                vertRadius = 4;
	            //设置阴影
	            graphics.setShadowOffsetX(4);
	            graphics.setShadowOffsetY(4);
	            graphics.setShadowBlur(4);
	            graphics.setShadowColor("rgba(0, 0, 0, 0.5)");
	            //↓开始创建路径
	            graphics.beginPath();
	            graphics.moveTo(x + 0.5, y + vertRadius);
	            //左边+左下弧
	            graphics.lineToEllipse(x + horiRadius + 0.5, y + height - vertRadius, horiRadius, vertRadius - 0.5, 180, 270, true);
	            //下边+右下弧
	            //如果箭头在下边
	            if (this.directionY == PositionConstants.SOUTH) {
	                if (this.directionX == PositionConstants.WEST) {
	                    //左边
	                    graphics.lineTo(x + horiRadius + ToolTipBorder.WEIGHT + insets.bottom, y + height);
	                    graphics.lineTo(x + horiRadius + ToolTipBorder.WEIGHT + (-insets.bottom / 2), y + height + insets.bottom);
	                    graphics.lineTo(x + horiRadius + ToolTipBorder.WEIGHT, y + height);
	                } else {
	                    //右边
	                    graphics.lineTo(x + width - horiRadius - ToolTipBorder.WEIGHT - insets.bottom, y + height);
	                    graphics.lineTo(x + width - horiRadius - ToolTipBorder.WEIGHT - (-insets.bottom / 2), y + height + insets.bottom);
	                    graphics.lineTo(x + width - horiRadius - ToolTipBorder.WEIGHT, y + height);
	                }
	            }
	            graphics.lineToEllipse(x + width - horiRadius, y + height - vertRadius - 0.5, horiRadius, vertRadius - 0.5, 270, 360, true);
	            //左边+右上弧
	            graphics.lineToEllipse(x + width - horiRadius, y + vertRadius, horiRadius, vertRadius, 0, 90, true);

	            //如果箭头在上边
	            if (this.directionY == PositionConstants.NORTH) {
	                if (this.directionX == PositionConstants.WEST) {
	                    //左边
	                    graphics.lineTo(x + horiRadius + ToolTipBorder.WEIGHT + insets.top, y);
	                    graphics.lineTo(x + horiRadius + ToolTipBorder.WEIGHT + (-insets.top / 2), y - insets.top);
	                    graphics.lineTo(x + horiRadius + ToolTipBorder.WEIGHT, y);
	                } else {
	                    //右边
	                    graphics.lineTo(x + width - horiRadius - ToolTipBorder.WEIGHT - insets.top, y);
	                    graphics.lineTo(x + width - horiRadius - ToolTipBorder.WEIGHT - (-insets.top / 2), y - insets.top);
	                    graphics.lineTo(x + width - horiRadius - ToolTipBorder.WEIGHT, y);
	                }
	            }
	            //上边加加左上弧
	            graphics.lineToEllipse(x + horiRadius + 0.5, y + vertRadius, horiRadius, vertRadius, 90, 180, true);
	            graphics.closePath();
	            //↑路径创建结束
	            //描边
	            if (this.getColor() != null) {
	                graphics.setStrokeColor(this.getColor());
	                graphics.stroke();
	            }
	            //填充
	            if (this.getFillColor() != null) {
	                graphics.setFillColor(this.getFillColor());
	                graphics.fill();
	            }


	        },
	        getInsets: function() {
	            return new Insets(ToolTipBorder.WEIGHT, ToolTipBorder.WEIGHT, ToolTipBorder.WEIGHT, ToolTipBorder.WEIGHT);
	        }
	    });

	    return ToolTipBorder;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 110 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	//从event.js中拆分出来
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require) {
	    'use strict';

	    var KeyEvent = function(dispatcher, source, ke) {
	        KeyEvent.superclass.constructor.call(this, dispatcher, source, ke.stateMask);
	        //没有character
	        this.character = ke.character;
	        this.keyCode = ke.keyCode;
	        this.e = ke.e;

	    };

	    return KeyEvent;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 111 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(11)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, PositionConstants) {
	    'use strict';

	    var Cursor = {};

	    /**
	     * @static
	     * @field
	     */
	    Cursor.POINTER = "pointer";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.CROSS_HAIR = "crosshair";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.TEXT = "text";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.WAIT = "wait";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.DEFAULT = "default";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.HELP = "help";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.E_RESIZE = "e-resize";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.NE_RESIZE = "ne-resize";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.N_RESIZE = "n-resize";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.NW_RESIZE = "nw-resize";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.W_RESIZE = "w-resize";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.SW_RESIZE = "sw-resize";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.S_RESIZE = "s-resize";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.SE_RESIZE = "se-resize";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.AUTO = "auto";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.DISABLE = "no-drop";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.NO = "";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.MOVE = "move";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.PROGRESS = "progress";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.VERTICAL_TEXT = "vertical-text";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.COL_RESIZE = "col-resize";
	    /**
	     * @static
	     * @field
	     */
	    Cursor.ROW_RESIZE = "row-resize";
	    /**
	     * 根据方向得到鼠标样式
	     * @static
	     * @param {int} direction 方向 参考<a href="PositionConstants.html">PositionConstants</a>
	     * @param {boolean} isMirrored 此参数可忽略
	     */
	    Cursor.getDirectionalCursor = function(direction, isMirrored) {

	        if (isMirrored && (direction & PositionConstants.EAST_WEST) != 0)
	            direction = direction ^ PositionConstants.EAST_WEST;
	        switch (direction) {
	            case PositionConstants.NORTH:
	                return Cursor.N_RESIZE;
	            case PositionConstants.SOUTH:
	                return Cursor.S_RESIZE;
	            case PositionConstants.EAST:
	                return Cursor.E_RESIZE;
	            case PositionConstants.WEST:
	                return Cursor.W_RESIZE;
	            case PositionConstants.SOUTH_EAST:
	                return Cursor.SE_RESIZE;
	            case PositionConstants.SOUTH_WEST:
	                return Cursor.SW_RESIZE;
	            case PositionConstants.NORTH_EAST:
	                return Cursor.NE_RESIZE;
	            case PositionConstants.NORTH_WEST:
	                return Cursor.NW_RESIZE;
	            default:
	                break;
	        }
	        return null;
	    };

	    return Cursor;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 112 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    var EventHandler = function(host) {
	        EventHandler.superclass.constructor.call(this);
	        this.host = host;
	    };

	    //static properties
	    util.defineClass(EventHandler, Object, {
	        keyPressed: function(e) {
	            this.host.getEventDispatcher().dispatchKeyPressed(e);
	        },
	        keyDown: function(e) {
	            this.host.getEventDispatcher().dispatchKeyDown(e);
	        },
	        keyReleased: function(e) {
	            this.host.getEventDispatcher().dispatchKeyReleased(e);
	        },
	        mouseDoubleClick: function(e) {
	            this.host.getEventDispatcher().dispatchMouseDoubleClicked(e);
	        },
	        click: function(e) {
	            this.host.getEventDispatcher().dispatchMouseClicked(e);
	        },
	        mouseDown: function(e) {
	            this.host.getEventDispatcher().dispatchMousePressed(e);
	        },
	        mouseExit: function(e) {
	            this.host.getEventDispatcher().dispatchMouseExited(e);
	        },
	        mouseHover: function(e) {
	            this.host.getEventDispatcher().dispatchMouseHover(e);
	        },
	        mouseMove: function(e) {
	            this.host.getEventDispatcher().dispatchMouseMoved(e);
	        },
	        mouseUp: function(e) {
	            this.host.getEventDispatcher().dispatchMouseReleased(e);
	        },
	        mouseWheel: function(e) {
	            this.host.getEventDispatcher().dispatchMouseWheelScrolled(e);
	        },
	        touchStart: function(e) {
	            this.host.getEventDispatcher().dispatchTouchStart(e);
	        },
	        touchMove: function(e) {
	            this.host.getEventDispatcher().dispatchTouchMove(e);
	        },
	        touchEnd: function(e) {
	            this.host.getEventDispatcher().dispatchTouchEnd(e);
	        }
	    });

	    return EventHandler;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 113 */
/***/ function(module, exports) {

	/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */

	// define(function(require){
	//   'use strict';
	//   var util = require('./util');
	//   var Point = require('./geometry/Point');

	//   var InputEvent = function(dispatcher, source, state){
	//     this.source = source;
	//     this.state = state;
	//     this.consumed = false;
	//   }
	//
	//   InputEvent.ALT = 1 << 16;
	//   InputEvent.SHIFT = 1 << 17;
	//   InputEvent.CTRL = 1 << 18;
	//   InputEvent.BUTTON1 = 1 << 19;
	//   InputEvent.BUTTON2 = 1 << 20;
	//   InputEvent.BUTTON3 = 1 << 21;
	//   InputEvent.BUTTON4 = 1 << 23;
	//   InputEvent.BUTTON5 = 1 << 25;
	//   InputEvent.BUTTON_MASK = InputEvent.BUTTON1 | InputEvent.BUTTON2 | InputEvent.BUTTON3 | InputEvent.BUTTON4 | InputEvent.BUTTON5;
	//
	//   //static properties
	// util.defineClass(InputEvent, Object, {
	//       consume: function(){
	//         this.consumed = true;
	//       },
	//       getSource: function(){
	//         return this.source;
	//       },
	//       getState: function(){
	//         return this.state;
	//       },
	//       isConsumed: function(){
	//         return this.consumed;
	//       }
	//   });


	  // var MouseEvent = function(x,y,dispatcher,f,button,stateMask,me){
	  //   MouseEvent.superclass.constructor.call(this, dispatcher, f, stateMask);
	  //   var  pt = Point.SINGLETON;
	  //   pt.setLocation(x, y);
	  //   f.translateToRelative(pt);
	  //   this.button = button;
	  //   this.x = pt.x;
	  //   this.y = pt.y;
	  //   if (me) {
	  //     this.e = me.e;
	  //   }
	  // }
	  // util.defineClass(MouseEvent, InputEvent, {
	  //   getLocation: function(){
	  //     return new Point(this.x, this.y);
	  //   }
	  // });
	  //

	  // var TouchEvent = function(x,y,dispatcher,f,button,stateMask,me){
	  //   TouchEvent.superclass.constructor.call(this, dispatcher, f, stateMask);
	  //   var  pt = Point.SINGLETON;
	  //   pt.setLocation(x, y);
	  //   f.translateToRelative(pt);
	  //   this.button = button;
	  //   this.x = pt.x;
	  //   this.y = pt.y;
	  //   if (me) {
	  //     this.e = me.e;
	  //   }
	  //
	  // }
	  // //static properties
	  // util.defineClass(TouchEvent, InputEvent, {
	  //   getLocation: function(){
	  //     return new Point(this.x, this.y);
	  //   }
	  // });


	  // var KeyEvent = function(dispatcher,source,ke){
	  //   KeyEvent.superclass.constructor.call(this, dispatcher, source, ke.stateMask);
	  //   //没有character
	  //   this.character = ke.character;
	  //   this.keyCode = ke.keyCode;
	  //   this.e = ke.e;
	  //
	  // }

	  // var ChangeEvent = function(source,property){
	  //   ChangeEvent.superclass.constructor.call(this);
	  //   this.source = source;
	  //   this.property = property;
	  //
	  // }
	  //
	  // //static properties
	  // util.defineClass(ChangeEvent, Object, {
	  // getSource: function(){
	  // 	return this.source;
	  // },
	  // getPropertyName: function(){
	  // 	return this.property;
	  // },
	  // setPropertyName: function(string){
	  // 	this.property = string;
	  // }
	  // });

	  // var ActionEvent = function(source, actionName){
	  //   ActionEvent.superclass.constructor.call(this);
	  //   this.source = source;
	  //   this.actionName = actionName;
	  //
	  // }
	  //
	  // //static properties
	  // util.defineClass(ActionEvent, Object, {
	  //   getSource: function(){
	  //     return this.source;
	  //   },
	  //   getActionName: function(){
	  //     return this.actionName;
	  //   }
	  // });

	  // var FocusEvent = function(loser, gainer){
	  //   this.loser = loser;
	  //   this.gainer = gainer;
	  // }
	// });


/***/ },
/* 114 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
	 * $Id: ImageResourceManager.js,v 1.0 2013/03/30 14:42:26$
	 *
	 */
	/* ***** BEGIN LICENSE BLOCK *****
	 *	Contributor(s): jiangqifan@jiuqi.com.cn
	 ***** END LICENSE BLOCK ***** */

	/* ***** BEGIN GUIDE BLOCK *****
	 * use
	 * var img = ImageResourceManager.getImage(url);
	 * to get the iamge which you want.
	 * use
	 * img.addLoadListener(figure[,figure[,figure...]]);
	 * to blind your figure on the image.
	 * when the image loaded, it will call figure.pictureLoaded(),
	 * so please do want you want if pictureLoaded(), such
	 * as repaint your figure.
	 ***** END GUIDE BLOCK ***** */
	/**
	 * @class ImageResourceManager
	 *
	 */

	/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    var ImageResourceManager = (function() {

	        var manager = { 'imgs': {} }; // the manager instance

	        function addLoadListener(listener) {
	            if (this.loaded) {
	                return;
	            }
	            var i = 0; // loop counter
	            if (this.loadListeners == null) {
	                this.loadListeners = [];
	            }
	            for (i = 0; i < arguments.length; i++) {
	                if (arguments[i] != null) {
	                    if (!util.Array.contains(this.loadListeners, arguments[i])) {
	                        this.loadListeners.push(arguments[i]);
	                    }
	                }
	            }
	        }

	        function removeLoadListener(listener) {
	            if (this.loadListeners != null) {
	                util.Array.removeItem(this.loadListeners, listener);
	            }
	        }

	        function addImage(url) {
	            var img = new Image();
	            img.src = url;
	            manager.imgs[url] = img;
	            img.loadListeners = [];
	            img.loaded = false;
	            img.onload = function() {
	                img.loaded = true;
	                var listener; // the listener for this iamge
	                var i = 0; // loop counter
	                for (; i < img.loadListeners.length; i++) {
	                    listener = img.loadListeners[i];
	                    if (typeof listener.pictureLoaded == 'function') {
	                        listener.pictureLoaded();
	                    }
	                }
	            };

	            img.addLoadListener = addLoadListener;
	            img.removeLoadListener = removeLoadListener;
	            return img;
	        }
	        manager.getImage = function(url) {
	            return this.imgs[url] || addImage(url);
	        };
	        //@Deprecated
	        manager.addListener4Img = function(url) {
	            var img = manager.imgs[url]; //the iamge of the given url keep by manager
	            var i; // loop counter
	            if (img != null) {
	                if (!img.loadListeners) {
	                    return;
	                }
	                for (i = 1; i < arguments.length; i++) {
	                    if (arguments[i] != null) {
	                        img.loadListeners.push(arguments[i]);
	                    }
	                }
	            }
	        };
	        return manager;
	    })();
	    return ImageResourceManager;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 115 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(79),
	    __webpack_require__(2),
	    __webpack_require__(25),
	    __webpack_require__(12),
	    __webpack_require__(9)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, ViewportLayout, DefaultRangeModel, Figure, Rectangle, Point) {
	    'use strict';

	    /**
	     *
	     * @class 视口类
	     * @constructor
	     * @extends Figure
	     * @param {String} id 图形id
	     * @param {boolean} setting
	     * @returns
	     */
	    var Viewport = function(id, setting) {
	        Viewport.superclass.constructor.call(this, setting);
	        this.view = null;
	        this.useTranslate = false;
	        this.trackWidth = false;
	        this.trackHeight = false;
	        this.ignoreScroll = false;
	        this.horiztonalRangeModel = null;
	        this.verticalRangeModel = null;
	        this.setLayoutManager(new ViewportLayout());
	        this.setHorizontalRangeModel(new DefaultRangeModel());
	        this.setVerticalRangeModel(new DefaultRangeModel());
	        this.useTranslate = setting;

	    };


	    //static properties

	    Viewport.PROPERTY_VIEW_LOCATION = "viewLocation";
	    Viewport.PROPERTY_CONTENT_SIZE = "contentSize";

	    util.defineClass(Viewport, Figure, {
	        getClientArea: function(rect) {
	            rect = Viewport.superclass.getClientArea.call(this, rect);
	            if (this.useGraphicsTranslate()) {
	                rect.translate(this.getViewLocation());
	            }
	            return rect;
	        },
	        /**
	         * 得到内容
	         * @type Figure
	         */
	        getContents: function() {
	            return this.view;
	        },
	        /**
	         * 得到横向的范围模型
	         */
	        getHorizontalRangeModel: function() {
	            return this.horiztonalRangeModel;
	        },
	        /**
	         * 得到纵向的范围模型
	         */
	        getContentsTracksHeight: function() {
	            return this.trackHeight;
	        },
	        /**
	         *
	         */
	        getContentsTracksWidth: function() {
	            return this.trackWidth;
	        },
	        /**
	         * 得到纵向的范围模型
	         */
	        getVerticalRangeModel: function() {
	            return this.verticalRangeModel;
	        },
	        /**
	         * 得到当前可见的范围
	         * @type Rectangle
	         */
	        getViewableRect: function() {
	            var bounds = this.getBounds();
	            var location = this.getViewLocation();
	            return new Rectangle(location.x, location.y, bounds.width, bounds.height);
	        },
	        /**
	         * 得到当前可见的位置就是视口左上角相对于整个内容的位置
	         */
	        getViewLocation: function() {
	            return new Point(this.getHorizontalRangeModel().getValue(), this.getVerticalRangeModel().getValue());
	        },
	        localRevalidate: function() {
	            this.invalidate();
	            if (this.getLayoutManager() != null) {
	                this.getLayoutManager().invalidate();
	            }
	            this.getUpdateManager().addInvalidFigure(this);
	        },
	        paintClientArea: function(g) {
	            if (this.useGraphicsTranslate()) {
	                var p = this.getViewLocation();
	                g.translate(-p.x, -p.y);
	                g.pushState();
	                Viewport.superclass.paintClientArea.call(this, g);
	                g.restoreState();
	                g.translate(p.x, p.y);
	            } else {
	                Viewport.superclass.paintClientArea.call(this, g);
	            }
	        },
	        isCoordinateSystem: function() {
	            return this.useGraphicsTranslate() || Viewport.superclass.isCoordinateSystem.call(this);
	        },
	        /**
	         * 属性改变
	         */
	        propertyChange: function(event) {
	            var source = event.getSource();
	            if (source != null && util.isInstanceOf(source, DefaultRangeModel)) {
	                if (DefaultRangeModel.PROPERTY_VALUE == (event.getPropertyName())) {
	                    if (!this.ignoreScroll) {
	                        this.localRevalidate();
	                        if (this.useGraphicsTranslate()) {
	                            this.repaint();
	                            this.fireMoved();
	                        }
	                    }
	                    this.firePropertyChange(Viewport.PROPERTY_VIEW_LOCATION, event.getOldValue(), event.getNewValue());
	                } else if (DefaultRangeModel.PROPERTY_MAXIMUM == (event.getPropertyName())) {
	                    this.firePropertyChange(Viewport.PROPERTY_CONTENT_SIZE, event.getOldValue(), event.getNewValue());
	                }
	            }
	        },
	        readjustScrollBars: function() {
	            if (this.getContents() == null) {
	                return;
	            }
	            this.getVerticalRangeModel().setAll(0, this.getClientArea(new Rectangle()).height, this.getContents().getBounds().height);
	            this.getHorizontalRangeModel().setAll(0, this.getClientArea(new Rectangle()).width, this.getContents().getBounds().width);
	        },
	        /**
	         * 设置内容
	         * @param {Figure} figure
	         */
	        setContents: function(figure) {
	            if (this.view == figure) {
	                return;
	            }
	            if (this.view != null) {
	                this.remove(view);
	            }
	            this.view = figure;
	            if (this.view != null) {
	                this.add(figure);
	            }
	        },
	        /**
	         *
	         */
	        setContentsTracksHeight: function(track) {
	            this.trackHeight = track;
	        },
	        /**
	         *
	         */
	        setContentsTracksWidth: function(track) {
	            this.trackWidth = track;
	        },
	        /**
	         * 设置横向位置
	         */
	        setHorizontalLocation: function(value) {
	            this.setViewLocation(value, this.getVerticalRangeModel().getValue());
	        },
	        /**
	         * 设置横向范围模型
	         */
	        setHorizontalRangeModel: function(rangeModel) {
	            if (this.horiztonalRangeModel != null) {
	                this.horiztonalRangeModel.removePropertyChangeListener(this);
	            }
	            this.horiztonalRangeModel = rangeModel;
	            this.horiztonalRangeModel.addPropertyChangeListener(this);
	        },
	        /**
	         * 设置忽略滚动
	         */
	        setIgnoreScroll: function(value) {
	            this.ignoreScroll = value;
	        },
	        /**
	         * 设置纵向位置
	         */
	        setVerticalLocation: function(value) {
	            this.setViewLocation(this.getHorizontalRangeModel().getValue(), value);
	        },
	        /**
	         * 设置纵向范围模型
	         */
	        setVerticalRangeModel: function(rangeModel) {
	            if (this.verticalRangeModel != null) {
	                this.verticalRangeModel.removePropertyChangeListener(this);
	            }
	            this.verticalRangeModel = rangeModel;
	            this.verticalRangeModel.addPropertyChangeListener(this);
	        },
	        /**
	         * 设置可见位置
	         * setViewLocation(point);setViewLocation(x,y);
	         */
	        setViewLocation: function(arg1, arg2) {
	            if (arg1 == null) {
	                return;
	            }
	            var x;
	            var y;
	            if (util.isInstanceOf(arg1, Point)) {
	                x = arg1.x;
	                y = arg1.y;
	            } else if (arg2 != null) {
	                x = arg1;
	                y = arg2;
	            }
	            if (this.getHorizontalRangeModel().getValue() != x) {
	                this.getHorizontalRangeModel().setValue(x);
	            }
	            if (this.getVerticalRangeModel().getValue() != y) {
	                this.getVerticalRangeModel().setValue(y);
	            }
	        },
	        translateFromParent: function(t) {
	            if (this.useTranslate) {
	                t.performTranslate(this.getHorizontalRangeModel().getValue(), this.getVerticalRangeModel().getValue());
	            }
	            Viewport.superclass.translateFromParent.call(this, t);
	        },
	        translateToParent: function(t) {
	            if (this.useTranslate) {
	                t.performTranslate(-this.getHorizontalRangeModel().getValue(), -this.getVerticalRangeModel().getValue());
	            }
	            Viewport.superclass.translateToParent.call(this, t);
	        },
	        /**
	         *
	         */
	        useGraphicsTranslate: function() {
	            return this.useTranslate;
	        },
	        validate: function() {
	            Viewport.superclass.validate.call(this);
	            this.readjustScrollBars();
	        }
	    });

	    return Viewport;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 116 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(115),
	    __webpack_require__(80)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Viewport, FreeformViewportLayout) {
	    'use strict';

	    /**
	     *
	     * @class 自由视口
	     * @constructor
	     * @extends Viewport
	     */
	    var FreeformViewport = function(id) {
	        FreeformViewport.superclass.constructor.call(this, id, true);
	        this.setLayoutManager(new FreeformViewportLayout());

	    };


	    //static properties
	    util.defineClass(FreeformViewport, Viewport, {
	        readjustScrollBars: function() {
	            if (this.getContents() == null) {
	                return;
	            }
	            if (!(this.getContents().getFreeformExtent != null)) {
	                return;
	            }
	            var ff = this.getContents();
	            var clientArea = this.getClientArea();
	            var bounds = ff.getFreeformExtent().getCopy();
	            bounds.union(0, 0, clientArea.width, clientArea.height);
	            ff.setFreeformBounds(bounds);

	            this.getVerticalRangeModel().setAll(bounds.y, clientArea.height, bounds.bottom());
	            this.getHorizontalRangeModel().setAll(bounds.x, clientArea.width, bounds.right());
	        },
	        useLocalCoordinates: function() {
	            return true;
	        }
	    });

	    return FreeformViewport;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 117 */
/***/ function(module, exports) {

	// //Clickable
	// //----------------------------------Class Clickable---------------------
	//  _classes.registerClass("Clickable","Figure");
	//  /**
	//   * @class 可点击的图形
	//   * @constructor
	//   * @extends Figure
	//   * @param id
	//   * @param contents
	//   * @param style
	//   * @returns
	//   */
	//  function Clickable(id,contents,style){
	// 	if(typeof Clickable._initialized == "undefined"){
	// 		function prototypeFunction () {
	// 			/**
	// 			 * 增加点击监听器
	// 			 */
	// 			Clickable.prototype.addActionListener = function(listener){
	// 				this.addListener("ActionListener", listener);
	// 			}
	// 			/**
	// 			 * 增加改变监听器
	// 			 */
	// 			Clickable.prototype.addChangeListener = function(listener){
	// 				this.addListener("ChangeListener", listener);
	// 			}
	// 			Clickable.prototype.createDefaultModel = function(){
	// 				if (this.isStyle(Clickable.STYLE_TOGGLE)){
	// 					return new ToggleModel();
	// 				}else{
	// 					return new ButtonModel();
	// 				}
	// 			}
	// 			Clickable.prototype.createEventHandler = function(){
	// 				return new ClickableEventHandler();
	// 			}
	// 			Clickable.prototype.createModelObserver = function(){
	// 				var modelObserver = new Object();
	// 				var host = this;
	// 				modelObserver.actionPerformed = function(action){
	// 					host.fireActionPerformed();
	// 				}
	// 				modelObserver.handleStateChanged = function(change){
	// 					host.fireStateChanged(change);
	// 				}
	// 				return modelObserver;
	// 			}
	// 			/**
	// 			 * 执行点击
	// 			 */
	// 			Clickable.prototype.doClick = function(){
	// 				this.fireActionPerformed();
	// 			}
	// 			Clickable.prototype.fireActionPerformed = function(){
	// 				var action = new ActionEvent(this);
	// 				var listeners = this.getListeners("ActionListener");
	// 				while (listeners.hasNext()){
	// 					listeners.next().actionPerformed(action);
	// 				}
	// 			}
	// 			Clickable.prototype.fireStateChanged = function(modelChange){
	// 				var change = new ChangeEvent(this, modelChange.getPropertyName());
	// 				var listeners = this.getListeners("ChangeListener");
	// 				while (listeners.hasNext()){
	// 					listeners.next().handleStateChanged(change);
	// 				}
	// 			}
	// 			/**
	// 			 * 获取模型
	// 			 * @type ButtonModel
	// 			 */
	// 			Clickable.prototype.getModel = function(){
	// 				return this.model;
	// 			}
	// 			Clickable.prototype.hookEventHandler = function(handler){
	// 				if (handler == null)  return;
	// 				this.addMouseListener(handler);
	// 				this.addMouseMotionListener(handler);
	// 				this.addChangeListener(handler);
	// 				this.addKeyListener(handler);
	// 				this.addFocusListener(handler);
	// 			}
	// 			/**
	// 			 * 是否可翻转
	// 			 * @type boolean
	// 			 */
	// 			Clickable.prototype.isRolloverEnabled = function(){
	// 				return (this.flags & Clickable.ROLLOVER_ENABLED_FLAG) != 0;
	// 			}
	// 			/**
	// 			 * 是否已选中
	// 			 * @type boolean
	// 			 */
	// 			Clickable.prototype.isSelected = function(){
	// 				return this.getModel().isSelected();
	// 			}
	// 			/**
	// 			 * 判断控件是否为某种风格
	// 			 * @param {int} style
	// 			 * @type boolean
	// 			 */
	// 			Clickable.prototype.isStyle = function(style){
	// 				return ((style & this.flags) == style);
	// 			}
	// 			Clickable.prototype.paintBorder = function(graphics){
	// 				this.isa = "Clickable";
	// 				this.parentMethod("paintBorder",graphics);
	// 				if (this.hasFocus()) {
	// 					graphics.setStrokeColor(ColorConstants.black);
	// 					//graphics.setBackgroundColor(ColorConstants.white);
	//
	// 					var area = this.getClientArea();
	// 					if (this.isStyle(Clickable.STYLE_BUTTON)){
	// 						graphics.drawFocus(area.x, area.y, area.width, area.height);
	// 					}else{
	// 						graphics.drawFocus(area.x, area.y, area.width - 1, area.height - 1);
	// 					}
	// 				}
	// 			}
	// 			Clickable.prototype.paintClientArea = function(graphics){
	// 				if (this.isStyle(Clickable.STYLE_BUTTON) && (this.getModel().isArmed() || this.getModel().isSelected())) {
	// 					graphics.translate(1, 1);
	// 					graphics.pushState();
	// 					this.isa = "Clickable";
	// 					this.parentMethod("paintClientArea",graphics);
	// 					graphics.restoreState();
	// 					graphics.translate(-1, -1);
	// 				}else{
	// 					this.isa = "Clickable";
	// 					this.parentMethod("paintClientArea",graphics);
	// 				}
	// 			}
	// 			/**
	// 			 * 移除点击监听器
	// 			 */
	// 			Clickable.prototype.removeActionListener = function(listener){
	// 				this.removeListener("ActionListener", listener);
	// 			}
	// 			/**
	// 			 * 移除改变监听器
	// 			 */
	// 			Clickable.prototype.removeChangeListener = function(listener){
	// 				this.removeListener("ChangeListener", listener);
	// 			}
	// 			/**
	// 			 * 设置显示内容
	// 			 * @param {Figure} contents 显示内容
	// 			 */
	// 			Clickable.prototype.setContents = function(contents){
	// 				this.setLayoutManager(new StackLayout());
	// 				if (this.getChildren().length > 0){
	// 					this.remove(this.getChildren()[0]);
	// 				}
	// 				this.add(contents);
	// 			}
	// 			/**
	// 			 * @see Figure#setEnabled
	// 			 */
	// 			Clickable.prototype.setEnabled = function(value){
	// 				if (this.isEnabled() == value) return;
	// 				this.isa = "Clickable";
	// 				this.parentMethod("setEnabled",value);
	// 				this.getModel().setEnabled(value);
	// 				this.setChildrenEnabled(value);
	// 			}
	// 			/**
	// 			 * 设置事件处理器
	// 			 * @param {Object} h 新的事件处理器
	// 			 */
	// 			Clickable.prototype.setEventHandler = function(h){
	// 				if (this.eventHandler != null) {
	// 					this.unhookEventHandler(this.eventHandler);
	// 				}
	// 				this.eventHandler = h;
	// 				if (this.eventHandler != null) {
	// 					this.hookEventHandler(this.eventHandler);
	// 				}
	// 			}
	// 			/**
	// 			 *
	// 			 */
	// 			Clickable.prototype.setFiringMethod = function(type){
	// 				this.getModel().setFiringBehavior(type);
	// 			}
	// 			/**
	// 			 * 设置模型
	// 			 */
	// 			Clickable.prototype.setModel = function(model){
	// 				if (this.model != null) {
	// 					this.model.removeChangeListener(this.modelObserver);
	// 					this.model.removeActionListener(this.modelObserver);
	// 					this.modelObserver = null;
	// 				}
	// 				this.model = model;
	// 				if (model != null) {
	// 					this.modelObserver = this.createModelObserver();
	// 					model.addActionListener(this.modelObserver);
	// 					model.addChangeListener(this.modelObserver);
	// 				}
	// 			}
	// 			/**
	// 			 * 设置可否翻转
	// 			 * @param {boolean} value
	// 			 */
	// 			Clickable.prototype.setRolloverEnabled = function(value){
	// 				if (this.isRolloverEnabled() == value) return;
	// 				this.setFlag(Clickable.ROLLOVER_ENABLED_FLAG, value);
	// 				this.repaint();
	// 			}
	// 			/**
	// 			 * 设置是否选中
	// 			 * @param {boolean} value
	// 			 */
	// 			Clickable.prototype.setSelected = function(value){
	// 				this.getModel().setSelected(value);
	// 			}
	// 			/**
	// 			 * 设置风格
	// 			 * @param {int} style 新的风格
	// 			 */
	// 			Clickable.prototype.setStyle = function(style){
	// 				if ((style & Clickable.STYLE_BUTTON) != 0) {
	// 					this.setFlag(Clickable.STYLE_BUTTON_FLAG, true);
	// 					if (!(this.getBorder()!=null && Util.isInstanceOf(this.getBorder(), ButtonBorder))){
	// 						this.setBorder(new ButtonBorder());
	// 					}
	// 					this.setOpaque(true);
	// 				}else{
	// 					this.setFlag(Clickable.STYLE_BUTTON_FLAG, false);
	// 					this.setOpaque(false);
	// 				}
	//
	// 				if ((style & Clickable.STYLE_TOGGLE) != 0) {
	// 					this.setFlag(Clickable.STYLE_TOGGLE_FLAG, true);
	// 					this.setModel(this.createDefaultModel());
	// 				}
	// 			}
	// 			Clickable.prototype.unhookEventHandler = function(handler){
	// 				if (handler == null)  return;
	// 				this.removeMouseListener(handler);
	// 				this.removeMouseMotionListener(handler);
	// 				this.removeChangeListener(handler);
	// 			}
	// 			Clickable.prototype.initialize = function(){
	// 				this.setModel(this.createDefaultModel());
	// 				this.setEventHandler(this.createEventHandler());
	// 			}
	// 			Clickable.prototype.init = function(id,contents,style){
	// 				this.isa = "Clickable";
	// 				this.parentMethod("init",id);
	// 				this.ClickableEventHandler = null;
	// 				this.model = null;
	// 				this.modelObserver = null;
	//
	// 				this.initialize();
	//
	// 				this.setRequestFocusEnabled(true);
	// 				this.setFocusTraversable(true);
	// 				if(contents != null){
	// 					this.setContents(contents);
	// 					if(style == null){
	// 						style = 0;
	// 					}
	// 					this.setStyle(style);
	// 				}
	// 			}
	// 		}
	// 		Clickable._initialized = true;
	// 		_classes.defineClass("Clickable",prototypeFunction);
	// 	}
	// 	this.init(id,contents,style);
	//  }
	// Clickable.ROLLOVER_ENABLED_FLAG = Figure.MAX_FLAG << 1;
	// Clickable.STYLE_BUTTON_FLAG = Figure.MAX_FLAG << 2;
	// Clickable.STYLE_TOGGLE_FLAG = Figure.MAX_FLAG << 3;
	// Clickable.MAX_FLAG = Clickable.STYLE_TOGGLE_FLAG;
	// /**
	//  * @static
	//  * @field
	//  */
	// Clickable.STYLE_BUTTON = Clickable.STYLE_BUTTON_FLAG;
	// /**
	//  * @static
	//  * @field
	//  */
	// Clickable.STYLE_TOGGLE = Clickable.STYLE_TOGGLE_FLAG;
	// /**
	//  * @static
	//  * @field
	//  */
	// Clickable.DEFAULT_FIRING = 0;
	// /**
	//  * @static
	//  * @field
	//  */
	// Clickable.REPEAT_FIRING = 1;
	//
	//
	//
	//
	//
	// //-----------------------------Class ClickableEventHandler-------
	// _classes.registerClass("ClickableEventHandler");
	// /**
	//  * @class 可点击的图形的事件处理器
	//  * @constructor
	//  */
	// function ClickableEventHandler(){
	// 		function prototypeFunction () {
	// 			/**
	// 			 * 失去焦点
	// 			 */
	// 			ClickableEventHandler.prototype.focusLost = function(fe){
	// 				var loser = fe.loser;
	// 				loser.repaint();
	// 				loser.getModel().setArmed(false);
	// 				loser.getModel().setPressed(false);
	// 			}
	// 			/**
	// 			 * 得到焦点
	// 			 */
	// 			ClickableEventHandler.prototype.focusGained = function(fe){
	// 				var clickable = fe.gainer;
	// 				clickable.repaint();
	// 			}
	// 			/**
	// 			 * 图形移动
	// 			 */
	// 			ClickableEventHandler.prototype.figureMoved = function(source){
	// 				if (this.lastEvent == null){
	// 					return;
	// 				}
	// 				this.mouseDragged(this.lastEvent);
	// 			}
	// 			/**
	// 			 * 处理状态改变
	// 			 */
	// 			ClickableEventHandler.prototype.handleStateChanged = function(change){
	// 				var clickable = change.getSource();
	// 				if (change.getPropertyName() == ButtonModel.MOUSEOVER_PROPERTY&& !clickable.isRolloverEnabled()){
	// 					return;
	// 				}
	// 				clickable.repaint();
	// 			}
	// 			/**
	// 			 * 鼠标拖动
	// 			 */
	// 			ClickableEventHandler.prototype.mouseDragged = function(me){
	// 				this.lastEvent = me;
	// 				var click = me.getSource();
	// 				var model = click.getModel();
	// 				if (model.isPressed()) {
	// 					var over = click.containsPoint(me.getLocation());
	// 					model.setArmed(over);
	// 					model.setMouseOver(over);
	// 				}
	// 			}
	// 			/**
	// 			 * 鼠标进入
	// 			 */
	// 			ClickableEventHandler.prototype.mouseEntered = function(me){
	// 				var click = me.getSource();
	// 				click.getModel().setMouseOver(true);
	// 				click.addFigureListener(this);
	// 			}
	// 			/**
	// 			 * 鼠标退出
	// 			 */
	// 			ClickableEventHandler.prototype.mouseExited = function(me){
	// 				var click = me.getSource();
	// 				click.getModel().setMouseOver(false);
	// 				click.removeFigureListener(this);
	// 			}
	// 			/**
	// 			 * 鼠标移动
	// 			 */
	// 			ClickableEventHandler.prototype.mouseMoved = function(me){
	//
	// 			}
	// 			/**
	// 			 * 鼠标按下
	// 			 */
	// 			ClickableEventHandler.prototype.mousePressed = function(me){
	// 				if (me.button != 1) return;
	// 				this.lastEvent = me;
	// 				var click = me.getSource();
	// 				var model = click.getModel();
	// 				click.requestFocus();
	// 				model.setArmed(true);
	// 				model.setPressed(true);
	// 				me.consume();
	//
	// 			}
	// 			/**
	// 			 * 鼠标松开
	// 			 */
	// 			ClickableEventHandler.prototype.mouseReleased = function(me){
	// 				if (me.button != 1) return;
	// 				var model = me.getSource().getModel();
	// 				if (!model.isPressed()) return;
	// 				model.setPressed(false);
	// 				model.setArmed(false);
	// 				me.consume();
	// 			}
	// 			/**
	// 			 * 键盘按下
	// 			 */
	// 			ClickableEventHandler.prototype.keyPressed = function(ke){
	// 				var model = ke.getSource().getModel();
	// 				//按下回车
	// 				if (ke.keyCode == 13) {
	// 					model.setPressed(true);
	// 					model.setArmed(true);
	// 				}
	// 			}
	// 			/**
	// 			 * 键盘松开
	// 			 */
	// 			ClickableEventHandler.prototype.keyReleased = function(ke){
	// 				var model = ke.getSource().getModel();
	// 				//按下回车
	// 				if (ke.keyCode == 13) {
	// 					model.setPressed(false);
	// 					model.setArmed(false);
	// 				}
	// 			}
	// 			ClickableEventHandler.prototype.init = function(){
	// 				this.parentMethod("init");
	// 				this.lastEvent = null;
	// 			}
	// 		}
	// 	_classes.defineClass("ClickableEventHandler",prototypeFunction);
	// 	this.init();
	// }


/***/ },
/* 118 */
/***/ function(module, exports) {

	// //Button
	// //-----------------------------Class Button-------
	// _classes.registerClass("Button","Clickable");
	// /**
	//  * @class 按钮
	//  * @constructor
	//  * @extends Clickable
	//  * @param {String} id 图形id
	//  * @param {String} arg1 文本
	//  * @param {Image} arg2 图形
	//  * @returns
	//  */
	// function Button(id,arg1,arg2){
	// 		function prototypeFunction () {
	//
	// 			Button.prototype.initialize = function(string){
	// 				this.isa = "Button";
	// 				this.parentMethod("initialize");
	// 				this.setBackgroundColor(ColorConstants.button);
	// 			}
	// 			Button.prototype.init = function(id,arg1,arg2){
	// 				//this.parentMethod("init",id);
	// 				if(arg1==null){
	// 					this.isa = "Button";
	// 					this.parentMethod("init",id);
	// 					this.setStyle(Clickable.STYLE_BUTTON);
	// 				}else{
	// 					this.isa = "Button";
	// 					this.parentMethod("init",id,new Label(id+"-label",arg1,arg2), Clickable.STYLE_BUTTON);
	// 				}
	//
	// 			}
	// 		}
	// 	_classes.defineClass("Button",prototypeFunction);
	// 	this.init(id,arg1,arg2);
	// }
	//
	//
	// //ArrowButton
	// //-----------------------------Class ArrowButton-------
	// _classes.registerClass("ArrowButton","Button");
	// /**
	//  * @class 显示箭头的按钮
	//  * @constructor
	//  * @extends Button
	//  * @param {String} id 图形id
	//  * @param {int} direction 箭头方向 <a href="PositionConstants.html">PositionConstants.html</a>
	//  * @returns
	//  */
	// function ArrowButton(id,direction){
	// 		function prototypeFunction () {
	//
	// 			ArrowButton.prototype.createTriangle = function(){
	// 				var tri = new Triangle(this.id+"-triangle");
	// 				tri.setOutline(true);
	// 				//tri.setFill(false);
	// 				tri.setFillColor(ColorConstants.listForeground);
	// 				tri.setOutlineColor(ColorConstants.listForeground);
	// 				//tri.setBackgroundColor(ColorConstants.listForeground);
	// 				//tri.setForegroundColor(ColorConstants.listForeground);
	// 				tri.setBorder(new MarginBorder(new Insets(2)));
	// 				this.setContents(tri);
	// 			}
	// 			ArrowButton.prototype.setDirection = function(value){
	// 				this.setChildrenDirection(value);
	// 			}
	// 			ArrowButton.prototype.setOrientation = function(value){
	// 				this.setChildrenOrientation(value);
	// 			}
	// 			ArrowButton.prototype.init = function(id,direction){
	// 				this.parentMethod("init",id);
	// 				this.createTriangle();
	// 				this.setRequestFocusEnabled(false);
	// 				this.setFocusTraversable(false);
	// 				this.setDirection(direction);
	// 			}
	// 		}
	// 	_classes.defineClass("ArrowButton",prototypeFunction);
	// 	this.init(id,direction);
	// }
	//
	//
	// //Toggle
	// //-----------------------------Class Toggle-------
	// _classes.registerClass("Toggle","Clickable");
	// /**
	//  * @class 可切换状态的控件
	//  * @constructor
	//  * @extends Toggle
	//  * @param {String} id 图形id
	//  * Toggle(id); Toggle(id,text,icon);Toggle(id,content);Toggle(id,contet,style);
	//  * @returns
	//  */
	// function Toggle(id,arg1,arg2){
	// 		function prototypeFunction () {
	// 			Toggle.prototype.init = function(id,arg1,arg2){
	// 				if(arg1 == null){
	// 					this.isa = "Toggle";
	// 					this.parentMethod("init",id);
	// 					this.setStyle(Clickable.STYLE_TOGGLE);
	// 				}else{
	// 					if(typeof arg1 == 'string' || arg1 instanceof String){
	// 						this.isa = "Toggle";
	// 						this.parentMethod("init",id,new Label(id+'label',arg1,arg2),Clickable.STYLE_TOGGLE);
	// 					}else if(Util.isInstanceOf(arg1, Figure)){
	// 						this.isa = "Toggle";
	// 						this.parentMethod("init",id,arg1,arg2==null?Clickable.STYLE_TOGGLE:arg2);
	// 					}
	// 				}
	// 			}
	// 		}
	// 	_classes.defineClass("Toggle",prototypeFunction);
	// 	this.init(id,arg1,arg2);
	// }
	//
	// //ToggleButton
	// //-----------------------------Class ToggleButton-------
	// _classes.registerClass("ToggleButton","Clickable");
	// /**
	//  * @class 可切换状态的按钮
	//  * @constructor
	//  * @extends ToggleButton
	//  * @param {String} id 图形id
	//  * ToggleButton(id); ToggleButton(id,text,icon);ToggleButton(id,content);
	//  * @returns
	//  */
	// function ToggleButton(id,arg1,arg2){
	// 		function prototypeFunction () {
	// 			/**
	// 			 * 填充背景阴影
	// 			 */
	// 			ToggleButton.prototype.fillCheckeredRectangle = function(graphics){
	// 				graphics.setFillColor(ColorConstants.button);
	// 				graphics.setStrokeColor(ColorConstants.buttonLightest);
	// 				var rect = this.getClientArea(Rectangle.SINGLETON).crop(new Insets(1, 1, 0, 0));
	// 				graphics.fillRectangle(rect.x, rect.y, rect.width, rect.height);
	//
	// 				graphics.clipRect(rect);
	// 				graphics.translate(rect.x, rect.y);
	// 				var n = rect.width + rect.height;
	// 				graphics.beginPath();
	// 				for (var i = 1; i < n; i += 2) {
	// 					graphics.moveTo(0,i);
	// 					graphics.lineTo(i,0);
	// 				}
	// 				graphics.stroke();
	// 				graphics.restoreState();
	// 			}
	// 			ToggleButton.prototype.paintFigure = function(graphics){
	// 				if (this.isSelected() && this.isOpaque()) {
	// 					this.fillCheckeredRectangle(graphics);
	// 				} else {
	// 					this.isa = "ToggleButton";
	// 					this.parentMethod("paintFigure",graphics);
	// 				}
	// 			}
	// 			ToggleButton.prototype.init = function(id,arg1,arg2){
	// 				if(arg1 == null){
	// 					this.isa = "ToggleButton";
	// 					this.parentMethod("init",id);
	// 					this.setStyle(Clickable.STYLE_BUTTON | Clickable.STYLE_TOGGLE);
	// 				}else{
	// 					if(typeof arg1 == 'string' || arg1 instanceof String){
	// 						this.isa = "ToggleButton";
	// 						this.parentMethod("init",id,new Label(id+'label',arg1,arg2),Clickable.STYLE_BUTTON | Clickable.STYLE_TOGGLE);
	// 					}else if(Util.isInstanceOf(arg1, Figure)){
	// 						this.isa = "ToggleButton";
	// 						this.parentMethod("init",id,arg1,Clickable.STYLE_BUTTON | Clickable.STYLE_TOGGLE);
	// 					}
	// 				}
	// 			}
	// 		}
	// 	_classes.defineClass("ToggleButton",prototypeFunction);
	// 	this.init(id,arg1,arg2);
	// }
	//
	//
	// //CheckBox
	// //-----------------------------Class CheckBox-------
	// _classes.registerClass("CheckBox","Toggle");
	// /**
	//  * @class 多选框
	//  * @constructor
	//  * @extends CheckBox
	//  * @param {String} id 图形id
	//  * CheckBox(id); CheckBox(id,text,icon);CheckBox(id,content);CheckBox(id,contet,style);
	//  * @returns
	//  */
	// function CheckBox(id,text){
	// 		function prototypeFunction () {
	// 			CheckBox.prototype.initialize = function(){
	// 				this.isa = "CheckBox";
	// 				this.parentMethod("initialize");
	// 				var that = this;
	// 				this.addChangeListener({
	// 					handleStateChanged: function(changeEvent) {
	// 						if (changeEvent.getPropertyName() == ButtonModel.SELECTED_PROPERTY)
	// 							that.handleSelectionChanged();
	// 					}
	// 				});
	// 			}
	// 			CheckBox.prototype.handleSelectionChanged = function(){
	// 				if (this.isSelected())
	// 					this.label.setIcon(CheckBox.CHECKED);
	// 				else
	// 					this.label.setIcon(CheckBox.UNCHECKED);
	// 			}
	// 			CheckBox.prototype.init = function(id,text){
	// 				this.label = new Label(id+'label',text,CheckBox.UNCHECKED);
	// 				this.isa = "CheckBox";
	// 				this.parentMethod("init",id,this.label);
	// 			}
	// 		}
	// 	_classes.defineClass("CheckBox",prototypeFunction);
	// 	this.init(id,text);
	// }
	// CheckBox.UNCHECKED = ImageResourceManager.getImage("");
	// CheckBox.CHECKED =  ImageResourceManager.getImage("");


/***/ },
/* 119 */
/***/ function(module, exports) {

	// //ButtonModel
	// //----------------------------------Class ButtonModel---------------------
	//  _classes.registerClass("ButtonModel");
	//  /**
	//   * @class 按钮模型
	//   * @constructor
	//   * @returns
	//   */
	//  function ButtonModel(){
	// 	if(typeof ButtonModel._initialized == "undefined"){
	// 		function prototypeFunction () {
	// 			/**
	// 			 * 增加点击监听器
	// 			 */
	// 			ButtonModel.prototype.addActionListener = function(listener){
	// 				if (listener != null){
	// 					this.listeners.addListener("ActionListener", listener);
	// 				}
	// 			}
	// 			/**
	// 			 * 增加改变监听器
	// 			 */
	// 			ButtonModel.prototype.addChangeListener = function(listener){
	// 				if (listener != null){
	// 					this.listeners.addListener("ChangeListener", listener);
	// 				}
	// 			}
	// 			/**
	// 			 * 增加状态转移监听器
	// 			 */
	// 			ButtonModel.prototype.addStateTransitionListener = function(listener){
	// 				if (listener != null){
	// 					this.listeners.addListener("ButtonStateTransitionListener", listener);
	// 				}
	// 			}
	// 			ButtonModel.prototype.fireActionPerformed = function(){
	// 				var iter = this.listeners.getListeners("ActionListener");
	// 				var action = new ActionEvent(this);
	// 				while (iter.hasNext()){
	// 					iter.next().actionPerformed(action);
	// 				}
	// 			}
	// 			ButtonModel.prototype.fireCanceled = function(){
	// 				var iter = this.listeners.getListeners("ButtonStateTransitionListener");
	// 				while (iter.hasNext()){
	// 					iter.next().canceled();
	// 				}
	// 			}
	// 			ButtonModel.prototype.firePressed = function(){
	// 				var iter = this.listeners.getListeners("ButtonStateTransitionListener");
	// 				while (iter.hasNext()){
	// 					iter.next().pressed();
	// 				}
	// 			}
	// 			ButtonModel.prototype.fireReleased = function(){
	// 				var iter = this.listeners.getListeners("ButtonStateTransitionListener");
	// 				while (iter.hasNext()){
	// 					iter.next().released();
	// 				}
	// 			}
	// 			ButtonModel.prototype.fireResume = function(){
	// 				var iter = this.listeners.getListeners("ButtonStateTransitionListener");
	// 				while (iter.hasNext()){
	// 					iter.next().resume();
	// 				}
	// 			}
	// 			ButtonModel.prototype.fireStateChanged = function(property){
	// 				var iter = this.listeners.getListeners("ChangeListener");
	// 				var change = new ChangeEvent(this, property);
	// 				while (iter.hasNext()){
	// 					iter.next().handleStateChanged(change);
	// 				}
	// 			}
	// 			ButtonModel.prototype.fireSuspend = function(){
	// 				var iter = this.listeners.getListeners("ButtonStateTransitionListener");
	// 				while (iter.hasNext()){
	// 					iter.next().suspend();
	// 				}
	// 			}
	// 			ButtonModel.prototype.getFlag = function(which){
	// 				return (this.state & which) != 0;
	// 			}
	// 			/**
	// 			 * 得到所在的组
	// 			 */
	// 			ButtonModel.prototype.getGroup = function(){
	// 				return this.group;
	// 			}
	// 			/**
	// 			 * 得到用户数据
	// 			 */
	// 			ButtonModel.prototype.getUserData = function(){
	// 				return this.data;
	// 			}
	// 			ButtonModel.prototype.installFiringBehavior = function(){
	// 				this.setFiringBehavior(ButtonModel.DEFAULT_FIRING_BEHAVIOR);
	// 			}
	// 			/**
	// 			 *
	// 			 */
	// 			ButtonModel.prototype.isArmed = function(){
	// 				return (this.state & ButtonModel.ARMED_FLAG) != 0;
	// 			}
	// 			/**
	// 			 * 是否可用
	// 			 */
	// 			ButtonModel.prototype.isEnabled = function(){
	// 				return (this.state & ButtonModel.ENABLED_FLAG) != 0;
	// 			}
	// 			/**
	// 			 * 是否鼠标在按钮之上
	// 			 */
	// 			ButtonModel.prototype.isMouseOver = function(){
	// 				return (this.state & ButtonModel.MOUSEOVER_FLAG) != 0;
	// 			}
	// 			/**
	// 			 * 是否按下
	// 			 */
	// 			ButtonModel.prototype.isPressed = function(){
	// 				return (this.state & ButtonModel.PRESSED_FLAG) != 0;
	// 			}
	// 			/**
	// 			 * 是否选中
	// 			 */
	// 			ButtonModel.prototype.isSelected = function(){
	// 				if (this.group == null) {
	// 					return (this.state & ButtonModel.SELECTED_FLAG) != 0;
	// 				}else{
	// 					return this.group.isSelected(this);
	// 				}
	// 			}
	// 			/**
	// 			 * 移除点击监听器
	// 			 */
	// 			ButtonModel.prototype.removeActionListener = function(listener){
	// 				this.listeners.removeListener("ActionListener", listener);
	// 			}
	// 			/**
	// 			 * 移除改变监听器
	// 			 */
	// 			ButtonModel.prototype.removeChangeListener = function(listener){
	// 				this.listeners.removeListener("ChangeListener", listener);
	// 			}
	// 			/**
	// 			 * 移除状态变化监听器
	// 			 */
	// 			ButtonModel.prototype.removeStateTransitionListener = function(listener){
	// 				this.listeners.removeListener("ButtonStateTransitionListener", listener);
	// 			}
	// 			/**
	// 			 *
	// 			 */
	// 			ButtonModel.prototype.setArmed = function(value){
	// 				if (this.isArmed() == value) return;
	// 				if (!this.isEnabled()) return;
	// 				this.setFlag(ButtonModel.ARMED_FLAG, value);
	// 				this.fireStateChanged(ButtonModel.ARMED_PROPERTY);
	// 			}
	// 			/**
	// 			 * 设置是否可用
	// 			 * @param {boolean} value
	// 			 */
	// 			ButtonModel.prototype.setEnabled = function(value){
	// 				if (this.isEnabled() == value) return;
	// 				if (!value) {
	// 					this.setMouseOver(false);
	// 					this.setArmed(false);
	// 					this.setPressed(false);
	// 				}
	// 				this.setFlag(ButtonModel.ENABLED_FLAG, value);
	// 				this.fireStateChanged(ButtonModel.ENABLED_PROPERTY);
	// 			}
	// 			/**
	// 			 *
	// 			 */
	// 			ButtonModel.prototype.setFiringBehavior = function(type){
	// 				if (this.firingBehavior != null){
	// 					this.removeStateTransitionListener(this.firingBehavior);
	// 				}
	// 				switch (type) {
	// 					case ButtonModel.REPEAT_FIRING_BEHAVIOR:
	// 						this.firingBehavior = new RepeatFiringBehavior(this);
	// 						break;
	// 					default:
	// 						this.firingBehavior = new DefaultFiringBehavior(this);
	// 				}
	// 				this.addStateTransitionListener(this.firingBehavior);
	// 			}
	// 			/**
	// 			 *
	// 			 */
	// 			ButtonModel.prototype.setFlag = function(flag,value){
	// 				if (value){
	// 					this.state |= flag;
	// 				}else{
	// 					this.state &= ~flag;
	// 				}
	// 			}
	// 			/**
	// 			 * 设置组
	// 			 *
	// 			 */
	// 			ButtonModel.prototype.setGroup = function(bg){
	// 				if (this.group == bg) return;
	// 				if (this.group != null) this.group.remove(this);
	// 				this.group = bg;
	// 				if (this.group != null) this.group.add(this);
	// 			}
	// 			/**
	// 			 * 鼠标在按键上
	// 			 * @param {boolean} value
	// 			 */
	// 			ButtonModel.prototype.setMouseOver = function(value){
	// 				if (this.isMouseOver() == value) return;
	// 				if (this.isPressed()){
	// 					if (value){
	// 						this.fireResume();
	// 					}else{
	// 						this.fireSuspend();
	// 					}
	// 				}
	// 				this.setFlag(ButtonModel.MOUSEOVER_FLAG, value);
	// 				this.fireStateChanged(ButtonModel.MOUSEOVER_PROPERTY);
	// 			}
	// 			/**
	// 			 * 鼠标按下
	// 			 * @param {boolean} value
	// 			 */
	// 			ButtonModel.prototype.setPressed = function(value){
	// 				if (this.isPressed() == value) return;
	// 				this.setFlag(ButtonModel.PRESSED_FLAG, value);
	// 				if (value) {
	// 					this.firePressed();
	// 				}else{
	// 					if (this.isArmed()){
	// 						this.fireReleased();
	// 					}else{
	// 						this.fireCanceled();
	// 					}
	// 				}
	// 				this.fireStateChanged(ButtonModel.PRESSED_PROPERTY);
	// 			}
	// 			/**
	// 			 * 选中
	// 			 * @param {boolean} value
	// 			 */
	// 			ButtonModel.prototype.setSelected = function(value){
	// 				if (this.group == null) {
	// 					if (this.isSelected() == value) return;
	// 				}else{
	// 					this.group.setSelected(this, value);
	// 					if (this.getFlag(ButtonModel.SELECTED_FLAG) == this.isSelected()) return;
	// 				}
	// 				this.setFlag(ButtonModel.SELECTED_FLAG, value);
	// 				this.fireStateChanged(ButtonModel.SELECTED_PROPERTY);
	// 			}
	// 			/**
	// 			 * 设置用户数据
	// 			 */
	// 			ButtonModel.prototype.setUserData = function(data){
	// 				this.data = data;
	// 			}
	// 			ButtonModel.prototype.init = function(){
	// 				this.parentMethod("init");
	// 				this.state = ButtonModel.ENABLED_FLAG;
	// 				this.data = new Object();
	// 				this.actionName = null;
	// 				this.group = null;
	// 				this.listeners = new EventListenerList();
	// 				this.firingBehavior = null;
	// 				this.installFiringBehavior();
	// 			}
	// 		}
	// 		ButtonModel._initialized = true;
	// 		_classes.defineClass("ButtonModel",prototypeFunction);
	// 	}
	// 	this.init();
	//  }
	//
	//
	// /**
	//  * @static
	//  * @field String
	//  */
	// ButtonModel.ENABLED_PROPERTY = "enabled";
	// /**
	//  * @static
	//  * @field String
	//  */
	// ButtonModel.PRESSED_PROPERTY = "pressed";
	// /**
	//  * @static
	//  * @field String
	//  */
	// ButtonModel.SELECTED_PROPERTY = "selected";
	// /**
	//  * @static
	//  * @field String
	//  */
	// ButtonModel.ROLLOVER_ENABLED_PROPERTY = "rollover enabled";
	// /**
	//  * @static
	//  * @field String
	//  */
	// ButtonModel.MOUSEOVER_PROPERTY = "mouseover";
	// /**
	//  * @static
	//  * @field String
	//  */
	// ButtonModel.ARMED_PROPERTY = "armed";
	//
	// ButtonModel.ARMED_FLAG = 1;
	// ButtonModel.PRESSED_FLAG = 2;
	// ButtonModel.MOUSEOVER_FLAG = 4;
	// ButtonModel.SELECTED_FLAG = 8;
	// ButtonModel.ENABLED_FLAG = 16;
	// ButtonModel.ROLLOVER_ENABLED_FLAG = 32;
	// ButtonModel.MAX_FLAG = ButtonModel.ROLLOVER_ENABLED_FLAG;
	//
	//
	// /**
	//  * @static
	//  * @field String
	//  */
	// ButtonModel.DEFAULT_FIRING_BEHAVIOR = 0;
	// /**
	//  * @static
	//  * @field String
	//  */
	// ButtonModel.REPEAT_FIRING_BEHAVIOR = 1;
	//
	//
	//
	// //----------------------------------Class ButtonStateTransitionListener---------------------
	//  _classes.registerClass("ButtonStateTransitionListener");
	//  function ButtonStateTransitionListener(){
	// 	if(typeof ButtonStateTransitionListener._initialized == "undefined"){
	// 		function prototypeFunction () {
	//
	// 			ButtonStateTransitionListener.prototype.cancel = function(){
	// 			}
	// 			ButtonStateTransitionListener.prototype.canceled = function(){
	// 			}
	// 			ButtonStateTransitionListener.prototype.press = function(){
	// 			}
	// 			ButtonStateTransitionListener.prototype.pressed = function(){
	// 			}
	// 			ButtonStateTransitionListener.prototype.release = function(){
	// 			}
	// 			ButtonStateTransitionListener.prototype.released = function(){
	// 			}
	// 			ButtonStateTransitionListener.prototype.resume = function(){
	// 			}
	// 			ButtonStateTransitionListener.prototype.suspend = function(){
	// 			}
	// 			ButtonStateTransitionListener.prototype.init = function(){
	// 				this.parentMethod("init");
	// 			}
	// 		}
	// 		ButtonStateTransitionListener._initialized = true;
	// 		_classes.defineClass("ButtonStateTransitionListener",prototypeFunction);
	// 	}
	// 	this.init();
	//  }
	//
	//  //DefaultFiringBehavior
	// //----------------------------------Class DefaultFiringBehavior---------------------
	//  _classes.registerClass("DefaultFiringBehavior","ButtonStateTransitionListener");
	//  function DefaultFiringBehavior(host){
	// 	if(typeof DefaultFiringBehavior._initialized == "undefined"){
	// 		function prototypeFunction () {
	// 			DefaultFiringBehavior.prototype.released = function(){
	// 				this.host.fireActionPerformed();
	// 			}
	// 			DefaultFiringBehavior.prototype.init = function(host){
	// 				this.parentMethod("init");
	// 				this.host = host;
	// 			}
	// 		}
	// 		DefaultFiringBehavior._initialized = true;
	// 		_classes.defineClass("DefaultFiringBehavior",prototypeFunction);
	// 	}
	// 	this.init(host);
	//  }
	//
	//   //RepeatFiringBehavior
	// //----------------------------------Class RepeatFiringBehavior---------------------
	//  _classes.registerClass("RepeatFiringBehavior","ButtonStateTransitionListener");
	//  function RepeatFiringBehavior(host){
	// 	if(typeof RepeatFiringBehavior._initialized == "undefined"){
	// 		function prototypeFunction () {
	// 			RepeatFiringBehavior.prototype.pressed = function(){
	// 				this.host.fireActionPerformed();
	// 				if (!host.isEnabled()){
	// 					return;
	// 				}
	// 				this.resume();
	// 			}
	// 			RepeatFiringBehavior.prototype.canceled = function(){
	// 				this.suspend();
	// 			}
	// 			RepeatFiringBehavior.prototype.released = function(){
	// 				this.suspend();
	// 			}
	// 			RepeatFiringBehavior.prototype.resume = function(){
	// 				var host = this.host;
	// 				var timer = this.timer;
	// 				var parent = this;
	// 				var timer_fun = function(){
	// 					if (!host.isEnabled()){
	// 						clearTimeout(timer);
	// 					}
	// 					parent.timer = setTimeout(timer_fun,parent.INITIAL_DELAY);
	// 					host.fireActionPerformed();
	// 				};
	//
	// 				this.timer = setTimeout(timer_fun,this.initialDelay);
	// 			}
	// 			RepeatFiringBehavior.prototype.suspend = function(){
	// 				if (this.timer == null) return;
	// 				clearTimeout(this.timer);
	// 				this.timer = null;
	// 			}
	// 			RepeatFiringBehavior.prototype.init = function(host){
	// 				this.parentMethod("init");
	// 				this.host = host;
	// 				this.stepDelay = RepeatFiringBehavior.STEP_DELAY;
	// 				this.initialDelay = RepeatFiringBehavior.INITIAL_DELAY;
	// 				this.timer = null;
	// 			}
	// 		}
	// 		RepeatFiringBehavior._initialized = true;
	// 		_classes.defineClass("RepeatFiringBehavior",prototypeFunction);
	// 	}
	// 	this.init(host);
	//  }
	//  RepeatFiringBehavior.INITIAL_DELAY = 250;
	//  RepeatFiringBehavior.STEP_DELAY = 40;
	//
	//  
	//  //ToggleModel
	//  //----------------------------------Class ToggleModel---------------------
	//  _classes.registerClass("ToggleModel","ButtonModel");
	//  function ToggleModel(){
	// 	if(typeof ToggleModel._initialized == "undefined"){
	// 		function prototypeFunction () {
	// 			ToggleModel.prototype.fireActionPerformed = function(){
	// 				this.setSelected(!this.isSelected());
	// 				this.isa = "ToggleModel";
	// 				this.parentMethod("fireActionPerformed");
	// 			}
	// 			ToggleModel.prototype.init = function(){
	// 				this.parentMethod("init");
	// 			}
	// 		}
	// 		ToggleModel._initialized = true;
	// 		_classes.defineClass("ToggleModel",prototypeFunction);
	// 	}
	// 	this.init();
	//  }

/***/ },
/* 120 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(121),
	    __webpack_require__(3),
	    __webpack_require__(25),
	    __webpack_require__(123),
	    __webpack_require__(115)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, ScrollPaneLayout, util, Figure, ScrollBar, Viewport) {
	    'use strict';

	    /**
	     * 滚动窗格
	     * @class 滚动窗格
	     * @constructor
	     * @param {String} id 图形ID
	     */
	    var ScrollPane = function(id) {
	        ScrollPane.superclass.constructor.call(this, id);
	        this.viewport = null;
	        this.hBar = null;
	        this.vBar = null;
	        this.hVisibility = ScrollPane.AUTOMATIC;
	        this.vVisibility = ScrollPane.AUTOMATIC;
	        this.setLayoutManager(new ScrollPaneLayout());

	    };

	    //static properties

	    /**
	     * 不使用滚动条
	     * @static
	     * @type int
	     */
	    ScrollPane.NEVER = 0;
	    /**
	     * 自动决定是否使用滚动条
	     * @static
	     * @type int
	     */
	    ScrollPane.AUTOMATIC = 1;
	    /**
	     * 总是使用滚动条
	     * @static
	     * @type int
	     */
	    ScrollPane.ALWAYS = 2;

	    util.defineClass(ScrollPane, Figure, {
	        /**
	         * @private
	         * 创建横向滚动条
	         */
	        createHorizontalScrollBar: function() {
	            var bar = new ScrollBar(this.id + "-scrollBar-H");
	            bar.setHorizontal(true);
	            this.setHorizontalScrollBar(bar);
	        },
	        /**
	         * @private
	         * 创建视口
	         */
	        createViewport: function() {
	            this.setViewport(new Viewport(this.id + "-viewPort"));
	        },
	        /**
	         * @private
	         * 创建纵向滚动条
	         */
	        createVerticalScrollBar: function() {
	            var bar = new ScrollBar(this.id + "-scrollBar-V");
	            this.setVerticalScrollBar(bar);
	        },
	        /**
	         * 得到横向滚动条
	         * @type ScrollBar
	         */
	        getHorizontalScrollBar: function() {
	            if (this.hBar == null) {
	                this.createHorizontalScrollBar();
	            }
	            return this.hBar;
	        },
	        /**
	         * 横向滚动条是否可见
	         * @type boolean
	         */
	        getHorizontalScrollBarVisibility: function() {
	            return this.hVisibility;
	        },
	        /**
	         * 得到纵向滚动条
	         * @type ScrollBar
	         */
	        getVerticalScrollBar: function() {
	            if (this.vBar == null) {
	                this.createVerticalScrollBar();
	            }
	            return this.vBar;
	        },
	        /**
	         * 纵向滚动条是否可见
	         * @type boolean
	         */
	        getVerticalScrollBarVisibility: function() {
	            return this.vVisibility;
	        },
	        /**
	         * 得到显示内容
	         * @type Figure
	         */
	        getContents: function() {
	            return this.getView();
	        },
	        getView: function() {
	            return this.getViewport().getContents();
	        },
	        /**
	         * 得到视口
	         * @type Viewport
	         */
	        getViewport: function() {
	            if (this.viewport == null) {
	                this.createViewport();
	            }
	            return this.viewport;
	        },
	        /**
	         * 是否不透明
	         * @returns true
	         * @type boolean
	         */
	        isOpaque: function() {
	            return true;
	        },
	        /**
	         * 横向滚动
	         * @param {Number} x 要横向滚动到的位置
	         */
	        scrollHorizontalTo: function(x) {
	            this.getViewport().setHorizontalLocation(x);
	        },
	        /**
	         * 滚动到
	         * @param {Point} location 要滚动到的位置
	         */
	        scrollTo: function(location) {
	            this.scrollHorizontalTo(location.x);
	            this.scrollVerticalTo(location.y);
	        },
	        /**
	         * 纵向滚动到
	         * @param {Number} y 要纵向滚动到的值
	         */
	        scrollVerticalTo: function(y) {
	            this.getViewport().setVerticalLocation(y);
	        },
	        /**
	         * 设置内容
	         * @param {Figure} figure 内容
	         */
	        setContents: function(figure) {
	            this.setView(figure);
	        },
	        /**
	         * 设置横向滚动条
	         * @param {ScrollBar} bar 横向滚动条
	         */
	        setHorizontalScrollBar: function(bar) {
	            if (this.hBar != null) {
	                this.remove(this.hBar);
	                this.hBar.getRangeModel().removePropertyChangeListener(this.hBar);
	            }
	            this.hBar = bar;
	            if (this.hBar != null) {
	                this.add(this.hBar);
	                this.hBar.setRangeModel(this.getViewport().getHorizontalRangeModel());
	            }
	        },
	        /**
	         * 设置横向滚动条是否可见
	         * @param {boolean} v 是否可见
	         */
	        setHorizontalScrollBarVisibility: function(v) {
	            if (this.hVisibility == v) {
	                return;
	            }
	            this.hVisibility = v;
	            this.revalidate();
	        },
	        /**
	         * 设置滚动条是否可见
	         * @param {boolean} v 是否可见
	         */
	        setScrollBarVisibility: function(v) {
	            this.setHorizontalScrollBarVisibility(v);
	            this.setVerticalScrollBarVisibility(v);
	        },
	        /**
	         * 设置纵向滚动条
	         * @param {ScrollBar} bar 纵向滚动条
	         */
	        setVerticalScrollBar: function(bar) {
	            if (this.vBar != null) {
	                this.remove(this.vBar);
	                this.vBar.getRangeModel().removePropertyChangeListener(this.vBar);
	            }
	            this.vBar = bar;
	            if (this.vBar != null) {
	                this.add(this.vBar);
	                this.vBar.setRangeModel(this.getViewport().getVerticalRangeModel());
	            }
	        },
	        /**
	         * 设置纵向滚动条是否可见
	         * @param {boolean} v 是否可见
	         */
	        setVerticalScrollBarVisibility: function(v) {
	            if (this.vVisibility == v) {
	                return;
	            }
	            this.vVisibility = v;
	            this.revalidate();
	        },
	        setView: function(figure) {
	            this.getViewport().setContents(figure);
	        },
	        /**
	         * 设置视口
	         * @param {Viewport} vp 新的视口
	         */
	        setViewport: function(vp) {
	            if (this.viewport != null) {
	                this.remove(this.viewport);
	            }
	            this.viewport = vp;
	            if (vp != null) {
	                this.add(vp, 0);
	            }
	        },
	        validate: function() {
	            ScrollPane.superclass.validate.call(this);
	            this.getHorizontalScrollBar().validate();
	            this.getVerticalScrollBar().validate();
	        }
	    });

	    return ScrollPane;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 121 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(78),
	    __webpack_require__(120),
	    __webpack_require__(12),
	    __webpack_require__(122)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractHintLayout, ScrollPane, Rectangle, ScrollPaneSolver) {
	    'use strict';

	    /**
	     * @class 滚动布局
	     * @extends AbstractLayout
	     * @constructor
	     */
	    var ScrollPaneLayout = function() {
	        ScrollPaneLayout.superclass.constructor.call(this);

	    };


	    //static properties

	    ScrollPaneLayout.NEVER = ScrollPane.NEVER;
	    ScrollPaneLayout.AUTO = ScrollPane.AUTOMATIC;
	    ScrollPaneLayout.ALWAYS = ScrollPane.ALWAYS;

	    util.defineClass(ScrollPaneLayout, AbstractHintLayout, {
	        calculateMinimumSize: function(figure, w, h) {
	            var scrollpane = figure;
	            var insets = scrollpane.getInsets();
	            var d = scrollpane.getViewport().getMinimumSize(w, h);
	            return d.getExpanded(insets.getWidth(), insets.getHeight());
	        },
	        calculatePreferredSize: function(container, wHint, hHint) {
	            var scrollpane = container;
	            var hBar = scrollpane.getHorizontalScrollBar();
	            var vBar = scrollpane.getVerticalScrollBar();
	            var insets = scrollpane.getInsets();

	            var reservedWidth = insets.getWidth();
	            var reservedHeight = insets.getHeight();

	            if (scrollpane.getVerticalScrollBarVisibility() != ScrollPane.NEVER) {
	                reservedWidth += vBar.getPreferredSize().width;
	            }
	            if (scrollpane.getHorizontalScrollBarVisibility() != ScrollPane.NEVER) {
	                reservedHeight += hBar.getPreferredSize().height;
	            }
	            if (wHint > -1) {
	                wHint = Math.max(0, wHint - reservedWidth);
	            }
	            if (hHint > -1) {
	                hHint = Math.max(0, hHint - reservedHeight);
	            }
	            return scrollpane.getViewport().getPreferredSize(wHint, hHint).getExpanded(reservedWidth, reservedHeight);
	        },
	        layout: function(parent) {
	            var scrollpane = parent;
	            var viewport = scrollpane.getViewport();
	            var hBar = scrollpane.getHorizontalScrollBar();
	            var vBar = scrollpane.getVerticalScrollBar();
	            var result = ScrollPaneSolver.solve(parent.getClientArea(), viewport, scrollpane.getHorizontalScrollBarVisibility(), scrollpane.getVerticalScrollBarVisibility(), vBar.getPreferredSize().width, hBar.getPreferredSize().height);
	            if (result.showV) {
	                vBar.setBounds(new Rectangle(result.viewportArea.right(), result.viewportArea.y, result.insets.right, result.viewportArea.height));
	            }
	            if (result.showH) {
	                hBar.setBounds(new Rectangle(result.viewportArea.x, result.viewportArea.bottom(), result.viewportArea.width, result.insets.bottom));
	            }
	            vBar.setVisible(result.showV);
	            hBar.setVisible(result.showH);

	            var vStepInc = vBar.getStepIncrement();
	            var vPageInc = vBar.getRangeModel().getExtent() - vStepInc;
	            if (vPageInc < vStepInc) {
	                vPageInc = vStepInc;
	            }
	            vBar.setPageIncrement(vPageInc);

	            var hStepInc = hBar.getStepIncrement();
	            var hPageInc = hBar.getRangeModel().getExtent() - hStepInc;
	            if (hPageInc < hStepInc) {
	                hPageInc = hStepInc;
	            }
	            hBar.setPageIncrement(hPageInc);

	        }
	    });

	    return ScrollPaneLayout;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 122 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(13),
	    __webpack_require__(10),
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, Insets, Dimension) {
	    'use strict';

	    var ScrollPaneSolver = {};

	    ScrollPaneSolver.NEVER = 0;
	    ScrollPaneSolver.AUTOMATIC = 1;
	    ScrollPaneSolver.ALWAYS = 2;

	    ScrollPaneSolver.solve = function(clientArea, viewport, hVis, vVis, vBarWidth, hBarHeight) {
	        var result = {};
	        result.insets = new Insets();
	        result.insets.bottom = hBarHeight;
	        result.insets.right = vBarWidth;

	        var available = clientArea.getSize();
	        var guaranteed = new Dimension(available).shrink((vVis == ScrollPaneSolver.NEVER ? 0 : result.insets.right), (hVis == ScrollPaneSolver.NEVER ? 0 : result.insets.bottom));
	        guaranteed.width = Math.max(guaranteed.width, 0);
	        guaranteed.height = Math.max(guaranteed.height, 0);
	        var wHint = guaranteed.width;
	        var hHint = guaranteed.height;

	        var preferred = viewport.getPreferredSize(wHint, hHint).getCopy();
	        var viewportInsets = viewport.getInsets();

	        var viewportMinSize = new Dimension(viewportInsets.getWidth(), viewportInsets.getHeight());
	        if (viewport.getContents() != null) {
	            if (viewport.getContentsTracksHeight() && hHint > -1) {
	                hHint = Math.max(0, hHint - viewportInsets.getHeight());
	            }
	            if (viewport.getContentsTracksWidth() && wHint > -1) {
	                wHint = Math.max(0, wHint - viewportInsets.getWidth());
	            }
	            viewportMinSize.expand(viewport.getContents().getMinimumSize(wHint, hHint));
	        }

	        if (viewport.getContentsTracksHeight()) {
	            preferred.height = viewportMinSize.height;
	        }
	        if (viewport.getContentsTracksWidth()) {
	            preferred.width = viewportMinSize.width;
	        }

	        var none = available.contains(preferred);
	        var both = !none && preferred.containsProper(guaranteed);
	        var showV = both || preferred.height > available.height;
	        var showH = both || preferred.width > available.width;

	        result.showV = vVis != ScrollPaneSolver.NEVER && (showV || vVis == ScrollPaneSolver.ALWAYS);
	        result.showH = hVis != ScrollPaneSolver.NEVER && (showH || hVis == ScrollPaneSolver.ALWAYS);

	        if (!result.showV) {
	            result.insets.right = 0;
	        }
	        if (!result.showH) {
	            result.insets.bottom = 0;
	        }
	        result.viewportArea = clientArea.getCropped(result.insets);
	        viewport.setBounds(result.viewportArea);
	        return result;
	    };

	    return ScrollPaneSolver;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 123 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(124),
	    __webpack_require__(18),
	    __webpack_require__(40),
	    __webpack_require__(21),
	    __webpack_require__(25),
	    __webpack_require__(117),
	    __webpack_require__(22),
	    __webpack_require__(48),
	    __webpack_require__(10),
	    __webpack_require__(2),
	    __webpack_require__(11),
	    __webpack_require__(125),
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    ThumbDragger,
	    Transposer,
	    LineBorder,
	    Color,
	    Figure,
	    Clickable,
	    ColorConstants,
	    Panel,
	    Dimension,
	    DefaultRangeModel,
	    PositionConstants,
	    ScrollBarLayout,
	    util
	) {
	    'use strict';

	    /**
	     * @class 滚动条
	     * @constructor
	     * @param {String} id 图形ID
	     */
	    var ScrollBar = function(id) {
	        ScrollBar.superclass.constructor.call(this, id);
	        this.rangeModel = null;
	        this.thumb = null;
	        this.pageUp = null;
	        this.pageDown = null;
	        this.buttonUp = null;
	        this.buttonDown = null;

	        this.thumbDragger = new ThumbDragger(this);
	        this._isHorizontal = false;
	        this.pageIncrement = 50;
	        this.stepIncrement = 10;
	        this.transposer = new Transposer();
	        this.setRangeModel(new DefaultRangeModel());
	        this.initialize();
	        var border = new LineBorder();
	        border.setColor(new Color(227, 227, 227));
	        this.setBorder(border);

	    };


	    //static properties

	    ScrollBar.ORIENTATION_FLAG = Figure.MAX_FLAG << 1;
	    ScrollBar.MAX_FLAG = ScrollBar.ORIENTATION_FLAG;
	    ScrollBar.COLOR_TRACK = new Color(237, 237, 237); //ColorConstants.gray;
	    ScrollBar.COLOR_THUMB = new Color(241, 241, 241);
	    ScrollBar.COLOR_BUTTON = new Color(12, 38, 52);

	    util.defineClass(ScrollBar, Figure, {
	        // createDefaultUpButton: function(){
	        //   var buttonUp = new COM.draw2d.ArrowButton(this.id+"-ArrowButton-up");
	        //   //buttonUp.setBorder(new ButtonBorder(ButtonBorder.SCHEMES.BUTTON_SCROLLBAR));
	        //   return buttonUp;
	        // },
	        // createDefaultDownButton: function(){
	        //   var buttonDown = new COM.draw2d.ArrowButton(this.id+"-ArrowButton-down");
	        //   //buttonDown.setBorder(new ButtonBorder(ButtonBorder.SCHEMES.BUTTON_SCROLLBAR));
	        //   return buttonDown;
	        // },
	        createPageDown: function() {
	            return this.createPageUp();
	        },
	        createPageUp: function() {
	            var clickable = new Clickable(this.id + "-Clickable-pageup");
	            clickable.setOpaque(true);
	            clickable.setBackgroundColor(ScrollBar.COLOR_TRACK);
	            clickable.setRequestFocusEnabled(false);
	            clickable.setFocusTraversable(false);
	            var changeListener = new {};
	            changeListener.handleStateChanged = function(evt) {
	                if (clickable.getModel().isArmed()) {
	                    clickable.setBackgroundColor(ColorConstants.black);
	                } else {
	                    clickable.setBackgroundColor(ScrollBar.COLOR_TRACK);
	                }
	            };

	            clickable.addChangeListener(changeListener);
	            return clickable;
	        },
	        createDefaultThumb: function() {
	            var thumb = new Panel(this.id + "-thumb");
	            thumb.setMinimumSize(new Dimension(6, 6));
	            thumb.setBackgroundColor(ScrollBar.COLOR_THUMB); //ColorConstants.black);
	            //thumb.setBorder(new SchemeBorder(SchemeBorder.SCHEMES.BUTTON_CONTRAST));
	            var border = new LineBorder();
	            border.setColor(new Color(151, 151, 151));
	            thumb.setBorder(border);
	            return thumb;
	        },
	        getButtonUp: function() {
	            return this.buttonUp;
	        },
	        getButtonDown: function() {
	            return this.buttonDown;
	        },
	        /**
	         *
	         */
	        getExtent: function() {
	            return this.getRangeModel().getExtent();
	        },
	        /**
	         *
	         */
	        getMinimum: function() {
	            return this.getRangeModel().getMinimum();
	        },
	        /**
	         *
	         */
	        getMaximum: function() {
	            return this.getRangeModel().getMaximum();
	        },
	        getPageDown: function() {
	            return this.pageDown;
	        },
	        /**
	         *
	         */
	        getPageIncrement: function() {
	            return this.pageIncrement;
	        },
	        getPageUp: function() {
	            return this.pageUp;
	        },
	        /**
	         *
	         */
	        getRangeModel: function() {
	            return this.rangeModel;
	        },
	        /**
	         *
	         */
	        getStepIncrement: function() {
	            return this.stepIncrement;
	        },
	        getThumb: function() {
	            return this.thumb;
	        },
	        /**
	         *
	         */
	        getValue: function() {
	            return this.getRangeModel().getValue();
	        },
	        getValueRange: function() {
	            return this.getMaximum() - this.getExtent() - this.getMinimum();
	        },
	        /**
	         *
	         */
	        isHorizontal: function() {
	            return this._isHorizontal;
	        },
	        pageDown: function() {
	            this.setValue(this.getValue() + this.getPageIncrement());
	        },
	        pageUp: function() {
	            this.setValue(this.getValue() - this.getPageIncrement());
	        },
	        /**
	         *
	         */
	        propertyChange: function(event) {
	            if (event.getSource() != null && util.isInstanceOf(event.getSource(), DefaultRangeModel)) {
	                this.setEnabled(this.getRangeModel().isEnabled());
	                if (DefaultRangeModel.PROPERTY_VALUE == event.getPropertyName()) {
	                    this.firePropertyChange("value", event.getOldValue(), event.getNewValue());
	                    this.revalidate();
	                }
	                if (DefaultRangeModel.PROPERTY_MINIMUM == event.getPropertyName()) {
	                    this.firePropertyChange("value", event.getOldValue(), event.getNewValue());
	                    this.revalidate();
	                }
	                if (DefaultRangeModel.PROPERTY_MAXIMUM == event.getPropertyName()) {
	                    this.firePropertyChange("value", event.getOldValue(), event.getNewValue());
	                    this.revalidate();
	                }
	                if (DefaultRangeModel.PROPERTY_EXTENT == event.getPropertyName()) {
	                    this.firePropertyChange("value", event.getOldValue(), event.getNewValue());
	                    this.revalidate();
	                }
	            }
	        },
	        revalidate: function() {
	            this.invalidate();
	            this.getUpdateManager().addInvalidFigure(this);
	        },
	        setDirection: function(direction) {
	            //Doesn't make sense for Scrollbar.
	        },
	        /**
	         *
	         */
	        setDownClickable: function(down) {
	            if (this.buttonDown != null) {
	                this.remove(this.buttonDown);
	            }
	            this.buttonDown = down;
	            if (this.buttonDown != null) {
	                if (this.buttonDown.setDirection != null) {
	                    this.buttonDown.setDirection(this.isHorizontal() ? PositionConstants.EAST : PositionConstants.SOUTH);
	                }
	                this.buttonDown.setFiringMethod(Clickable.REPEAT_FIRING);
	                var host = this;
	                var actionListener = {};
	                actionListener.actionPerformed = function(e) {
	                    host.stepDown();
	                };
	                this.buttonDown.addActionListener(actionListener);
	                this.add(this.buttonDown, ScrollBarLayout.DOWN_ARROW);
	            }
	        },
	        /**
	         *
	         */
	        setUpClickable: function(up) {
	            if (this.buttonUp != null) {
	                this.remove(this.buttonUp);
	            }
	            this.buttonUp = up;
	            if (up != null) {
	                if (up.setDirection != null) {
	                    up.setDirection(this.isHorizontal() ? PositionConstants.WEST : PositionConstants.NORTH);
	                }
	                this.buttonUp.setFiringMethod(Clickable.REPEAT_FIRING);
	                var host = this;
	                var actionListener = {};
	                actionListener.actionPerformed = function(e) {
	                    host.stepUp();
	                };
	                this.buttonUp.addActionListener(actionListener);
	                this.add(this.buttonUp, ScrollBarLayout.UP_ARROW);
	            }
	        },
	        /**
	         *
	         */
	        setEnabled: function(value) {
	            if (this.isEnabled() == value) return;
	            ScrollBar.superclass.setEnabled.call(this, value);
	            this.setChildrenEnabled(value);
	            if (this.getThumb() != null) {
	                this.getThumb().setVisible(value);
	                this.revalidate();
	            }
	        },
	        /**
	         *
	         */
	        setExtent: function(ext) {
	            if (this.getExtent() == ext) {
	                return;
	            }
	            this.getRangeModel().setExtent(ext);
	        },
	        /**
	         *
	         */
	        setHorizontal: function(value) {
	            this.setOrientation(value ? PositionConstants.HORIZONTAL : PositionConstants.VERTICAL);
	        },
	        /**
	         *
	         */
	        setMaximum: function(max) {
	            if (this.getMaximum() == max) return;
	            this.getRangeModel().setMaximum(max);
	        },
	        /**
	         *
	         */
	        setMinimum: function(min) {
	            if (this.getMinimum() == min) return;
	            this.getRangeModel().setMinimum(min);
	        },
	        setOrientation: function(value) {
	            if ((value == PositionConstants.HORIZONTAL) == this.isHorizontal()) return;
	            this._isHorizontal = (value == PositionConstants.HORIZONTAL);
	            this.transposer.setEnabled(this._isHorizontal);
	            this.setChildrenOrientation(value);
	            ScrollBar.superclass.revalidate.call(this);
	        },
	        /**
	         *
	         */
	        setPageIncrement: function(increment) {
	            var pageIncrement = increment;
	        },
	        /**
	         *
	         */
	        setPageDown: function(down) {
	            if (this.pageDown != null) this.remove(this.pageDown);
	            this.pageDown = down;
	            if (this.pageDown != null) {
	                this.pageDown.setFiringMethod(Clickable.REPEAT_FIRING);
	                var host = this;
	                var actionListener = {};
	                actionListener.actionPerformed = function(event) {
	                    host.pageDown();
	                };
	                this.pageDown.addActionListener(actionListener);
	                this.add(down, ScrollBarLayout.PAGE_DOWN);
	            }
	        },
	        /**
	         *
	         */
	        setPageUp: function(up) {
	            if (this.pageUp != null) {
	                this.remove(this.pageUp);
	            }
	            this.pageUp = up;
	            if (this.pageUp != null) {
	                this.pageUp.setFiringMethod(Clickable.REPEAT_FIRING);
	                var host = this;
	                var actionListener = {};
	                actionListener.actionPerformed = function(event) {
	                    host.pageUp();
	                };
	                this.pageUp.addActionListener(actionListener);
	                this.add(this.pageUp, ScrollBarLayout.PAGE_UP);
	            }
	        },
	        /**
	         *
	         */
	        setRangeModel: function(rangeModel) {
	            if (this.rangeModel != null) {
	                this.rangeModel.removePropertyChangeListener(this);
	            }
	            this.rangeModel = rangeModel;
	            rangeModel.addPropertyChangeListener(this);
	        },
	        /**
	         *
	         */
	        setStepIncrement: function(increment) {
	            this.stepIncrement = increment;
	        },
	        /**
	         *
	         */
	        setThumb: function(figure) {
	            if (this.thumb != null) {
	                this.thumb.removeMouseListener(this.thumbDragger);
	                this.thumb.removeMouseMotionListener(this.thumbDragger);
	                this.remove(this.thumb);
	            }
	            this.thumb = figure;
	            if (this.thumb != null) {
	                this.thumb.addMouseListener(this.thumbDragger);
	                this.thumb.addMouseMotionListener(this.thumbDragger);
	                this.add(this.thumb, ScrollBarLayout.THUMB);
	            }
	        },
	        /**
	         *
	         */
	        setValue: function(v) {
	            this.getRangeModel().setValue(v);
	        },
	        stepDown: function() {
	            this.setValue(this.getValue() + this.getStepIncrement());
	        },
	        stepUp: function() {
	            this.setValue(this.getValue() - this.getStepIncrement());
	        },
	        initialize: function() {
	            this.setLayoutManager(new ScrollBarLayout(this.transposer));
	            this.setUpClickable(this.createDefaultUpButton());
	            this.setDownClickable(this.createDefaultDownButton());
	            this.setPageUp(this.createPageUp());
	            this.setPageDown(this.createPageDown());
	            this.setThumb(this.createDefaultThumb());
	        }
	    });

	    return ScrollBar;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 124 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(12),
	    __webpack_require__(10)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Rectangle, Dimension) {
	    'use strict';

	    var ThumbDragger = function(host) {
	        ThumbDragger.superclass.constructor.call(this);
	        this.host = host;
	        this.start = null;
	        this.dragRange = null;
	        this.revertValue = null;
	        this.armed = null;

	    };

	    //static properties
	    util.defineClass(ThumbDragger, Object, {
	        mousePressed: function(me) {
	            this.armed = true;
	            this.start = me.getLocation();
	            var area = new Rectangle(this.host.transposer.t(this.host.getClientArea()));
	            var thumbSize = this.host.transposer.t(this.host.getThumb().getSize());
	            if (this.host.getButtonUp() != null) {
	                area.height -= this.host.transposer.t(this.host.getButtonUp().getSize()).height;
	            }
	            if (this.host.getButtonDown() != null) {
	                area.height -= this.host.transposer.t(this.host.getButtonDown().getSize()).height;
	            }
	            var sizeDifference = new Dimension(area.width, area.height - thumbSize.height);
	            this.dragRange = sizeDifference.height;
	            this.revertValue = this.host.getValue();
	            //me.consume();
	        },
	        mouseDragged: function(me) {
	            if (!this.armed) return;
	            var difference = this.host.transposer.t(me.getLocation().getDifference(this.start));
	            var change = this.host.getValueRange() * difference.height / this.dragRange;
	            this.host.setValue(this.revertValue + change);
	            //me.consume();
	        },
	        mouseReleased: function(me) {
	            if (!this.armed) return;
	            this.armed = false;
	            //me.consume();
	        }
	    });

	    return ThumbDragger;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 125 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(68),
	    __webpack_require__(10),
	    __webpack_require__(12),
	    __webpack_require__(13)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractLayout, Dimension, Rectangle, Insets) {
	    'use strict';

	    /**
	     * @class 滚动条布局
	     * @extends AbstractLayout
	     * @constructor
	     */
	    var ScrollBarLayout = function() {
	        ScrollBarLayout.superclass.constructor.call(this);
	        this.up = null;
	        this.down = null;
	        this.thumb = null;
	        this.pageUp = null;
	        this.pageDown = null;
	        this.transposer = t;

	    };

	    //static properties

	    ScrollBarLayout.UP_ARROW = "up arrow";
	    ScrollBarLayout.DOWN_ARROW = "down arrow";
	    ScrollBarLayout.THUMB = "thumb";
	    ScrollBarLayout.PAGE_UP = "page_up";
	    ScrollBarLayout.PAGE_DOWN = "page_down";

	    util.defineClass(ScrollBarLayout, AbstractLayout, {
	        setConstraint: function(figure, constraint) {

	            if (constraint == ScrollBarLayout.UP_ARROW) {
	                this.up = figure;
	            } else if (constraint == ScrollBarLayout.DOWN_ARROW) {
	                this.down = figure;
	            } else if (constraint == ScrollBarLayout.THUMB) {
	                this.thumb = figure;
	            } else if (constraint == ScrollBarLayout.PAGE_UP) {
	                this.pageUp = figure;
	            } else if (constraint == ScrollBarLayout.PAGE_DOWN) {
	                this.pageDown = figure;
	            }
	        },
	        calculatePreferredSize: function(parent, w, h) {
	            var insets = this.transposer.t(parent.getInsets());
	            var d = new Dimension(16, 16 * 4);
	            d.expand(insets.getWidth(), insets.getHeight());
	            return this.transposer.t(d);
	        },
	        layout: function(parent) {
	            var scrollBar = parent;
	            var trackBounds = this.layoutButtons(scrollBar);

	            var extent = scrollBar.getExtent();
	            var max = scrollBar.getMaximum();
	            var min = scrollBar.getMinimum();
	            var totalRange = max - min;
	            var valueRange = totalRange - extent;
	            if ((valueRange < 1) || (!scrollBar.isEnabled())) {
	                var boundsUpper = new Rectangle(trackBounds);
	                var boundsLower = new Rectangle(trackBounds);

	                boundsUpper.height /= 2;
	                boundsLower.y += boundsUpper.height;
	                boundsLower.height = trackBounds.height - boundsUpper.height;

	                if (this.pageUp != null) {
	                    this.pageUp.setBounds(this.transposer.t(boundsUpper));
	                }
	                if (this.pageDown != null) {
	                    this.pageDown.setBounds(this.transposer.t(boundsLower));
	                }
	                return;
	            }

	            if (totalRange == 0) {
	                return;
	            }

	            var thumbHeight = Math.max(this.thumb == null ? 0 : this.thumb.getMinimumSize().height, trackBounds.height * extent / totalRange);
	            if (this.thumb != null) {
	                this.thumb.setVisible(trackBounds.height > thumbHeight);
	            }
	            var thumbY = trackBounds.y + (trackBounds.height - thumbHeight) * (scrollBar.getValue() - min) / valueRange;
	            var thumbBounds = new Rectangle(trackBounds.x, thumbY, trackBounds.width, thumbHeight);

	            if (this.thumb != null) {
	                this.thumb.setBounds(this.transposer.t(thumbBounds));
	            }
	            if (this.pageUp != null) {
	                this.pageUp.setBounds(this.transposer.t(new Rectangle(trackBounds.x, trackBounds.y, trackBounds.width, thumbBounds.y - trackBounds.y)));
	            }
	            if (this.pageDown != null) {
	                this.pageDown.setBounds(this.transposer.t(new Rectangle(trackBounds.x, thumbBounds.y + thumbHeight, trackBounds.width, trackBounds.bottom() - thumbBounds.bottom())));
	            }
	        },
	        layoutButtons: function(scrollBar) {
	            var bounds = this.transposer.t(scrollBar.getClientArea());
	            var buttonSize = new Dimension(bounds.width, Math.min(bounds.width, bounds.height / 2));

	            if (this.up != null) {
	                this.up.setBounds(this.transposer.t(new Rectangle(bounds.getTopLeft(), buttonSize)));
	            }
	            if (this.down != null) {
	                var r = new Rectangle(bounds.x, bounds.bottom() - buttonSize.height, buttonSize.width, buttonSize.height);
	                this.down.setBounds(this.transposer.t(r));
	            }
	            var trackBounds = bounds.getCropped(new Insets((this.up == null) ? 0 : buttonSize.height, 0, (this.down == null) ? 0 : buttonSize.height, 0));
	            return trackBounds;
	        },
	        remove: function(child) {
	            if (child == this.up) {
	                this.up = null;
	            } else if (child == this.down) {
	                this.down = null;
	            } else if (child == this.thumb) {
	                this.thumb = null;
	            } else if (child == this.pageUp) {
	                this.pageUp = null;
	            } else if (child == this.pageDown) {
	                this.pageDown = null;
	            }

	        }
	    });

	    return ScrollBarLayout;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 126 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require) {
	  'use strict';

	  var Mouse = {
	      BUTTON1: 1 << 19,
	      BUTTON2: 1 << 20,
	      BUTTON3: 1 << 21,
	      BUTTON4: 1 << 22,
	      BUTTON5: 1 << 23,
	      DOUBLE: 1 << 28,
	      getStatemark: function (me) {
	          if(me.buttonDown) {
	              return Mouse.BUTTON1;
	          } else {
	              return 0;
	          }
	      },
	      getMouseNumber: function (me) {
	          return me.button;
	      }
	  };

	  Mouse.BUTTON_ANY =
	   Mouse.BUTTON1 |
	   Mouse.BUTTON2 |
	   Mouse.BUTTON3 |
	   Mouse.BUTTON4 |
	   Mouse.BUTTON5;
	//移到NonResixableEditPolicy.js里，因為只有這個模塊用到
	  var SharedCursors = {
	      CURSOR_TREE_ADD: ''
	  };

	  return Mouse;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));


/***/ },
/* 127 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-5-9
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require) {
	    'use strict';

	    if (KeyStroke) {
	        return;
	    }
	    var KeyStroke = function(character, keyCode, stateMask, onPressed) {
	        this.stateMask = stateMask;
	        this.character = character;
	        this.onPressed = onPressed;
	        this.keyCode = keyCode;
	    };
	    KeyStroke.prototype.equals = function(stroke) {
	        if (stroke == null) return;
	        if (stroke instanceof KeyStroke) {
	            return stroke.character == this.character && stroke.keyCode == this.keyCode && stroke.onPressed == this.onPressed && stroke.stateMask == this.stateMask;
	        }
	        return false;
	    };
	    KeyStroke.prototype.hashCode = function(obj) {
	        return (this.stateMask + 1) * ((this.character ^ this.keyCode) + 1) + (this.onPressed ? 0 : 32);
	    };
	    KeyStroke.prototype.toString = function(obj) {
	        return "<" + this.character + "," + this.keyCode + "," + this.onPressed + "," + this.stateMask + ">";
	    };
	    KeyStroke.KEYCODE_BIT = 1 << 24;
	    KeyStroke.ARROW_UP = KeyStroke.KEYCODE_BIT + 1;
	    KeyStroke.ARROW_DOWN = KeyStroke.KEYCODE_BIT + 2;
	    KeyStroke.ARROW_LEFT = KeyStroke.KEYCODE_BIT + 3;
	    KeyStroke.ARROW_RIGHT = KeyStroke.KEYCODE_BIT + 4;
	    KeyStroke.DEL = 0x7F;
	    KeyStroke.ESC = 0x1B;
	    KeyStroke.ALT = 1 << 16;
	    KeyStroke.CTRL = 1 << 18;
	    KeyStroke.SHIFT = 1 << 17;
	    KeyStroke.getStatemark = function(alt, ctrl, shift) {
	        var mark = 0;
	        if (alt) mark |= KeyStroke.ALT;
	        if (ctrl) mark |= KeyStroke.CTRL;
	        if (shift) mark |= KeyStroke.SHIFT;
	        return mark;
	    };
	    KeyStroke.get = function(event, pressed) {
	        return new KeyStroke(event.charCode, event.keyCode, this.getStatemark(event.altKey, event.ctrlKey, event.shiftKey), true);
	    };
	    KeyStroke.getPressedByCharacter = function(character, stateMask) {
	        return new KeyStroke(character, 0, stateMask, true);
	    };
	    KeyStroke.getPressedByKeyCode = function(keyCode, stateMask) {
	        return new KeyStroke(0, keyCode, stateMask, true);
	    };
	    KeyStroke.getPressed = function(character, keyCode, stateMask) {
	        return new KeyStroke(character, keyCode, stateMask, true);
	    };
	    KeyStroke.getReleasedByCharacter = function(character, stateMask) {
	        return new KeyStroke(character, 0, stateMask, false);
	    };
	    KeyStroke.getReleasedByKeyCode = function(keyCode, stateMask) {
	        return new KeyStroke(0, keyCode, stateMask, false);
	    };
	    KeyStroke.getReleased = function(character, keyCode, stateMask) {
	        return new KeyStroke(character, keyCode, stateMask, false);
	    };

	    return KeyStroke;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 128 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-16
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(32)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, ExclusionSearch) {
	    'use strict';

	    var ConditionalTreeSearch = function(coll, viewer, condition) {
	        ConditionalTreeSearch.superclass.constructor.call(this, coll);
	        this._viewer = viewer;
	        this._condition = condition;
	    };

	    util.defineClass(ConditionalTreeSearch, ExclusionSearch, { //ExclusionSearch
	        accept: function(figure) {
	            var editpart = null;
	            while (editpart == null && figure != null) {
	                editpart = this._viewer.getVisualPartMap().get(figure);
	                figure = figure.getParent();
	            }
	            return editpart != null && (this._condition == null || this._condition.evaluate(editpart));
	        }
	    });

	    return ConditionalTreeSearch;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 129 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-12
	 * @interface
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require) {
	    'use strict';

	    var EditPart = function() {};
	    //method
	    EditPart.prototype.activate = Function.needOverride;
	    EditPart.prototype.addEditPartListener = Function.needOverride;
	    EditPart.prototype.addNotify = Function.needOverride;
	    EditPart.prototype.deactivate = Function.needOverride;
	    EditPart.prototype.eraseSourceFeedback = Function.needOverride;
	    EditPart.prototype.eraseTargetFeedback = Function.needOverride;
	    EditPart.prototype.getChildren = Function.needOverride;
	    EditPart.prototype.getCommand = Function.needOverride;
	    EditPart.prototype.getDragTracker = Function.needOverride;
	    EditPart.prototype.getEditPolicy = Function.needOverride;
	    EditPart.prototype.getModel = Function.needOverride;
	    EditPart.prototype.getParent = Function.needOverride;
	    EditPart.prototype.getRoot = Function.needOverride;
	    EditPart.prototype.getSelected = Function.needOverride;
	    EditPart.prototype.getTargetEditPart = Function.needOverride;
	    EditPart.prototype.getViewer = Function.needOverride;
	    EditPart.prototype.hasFocus = Function.needOverride;
	    EditPart.prototype.installEditPolicy = Function.needOverride;
	    EditPart.prototype.isActive = Function.needOverride;
	    EditPart.prototype.isSelectable = Function.needOverride;
	    EditPart.prototype.performRequest = Function.needOverride;
	    EditPart.prototype.refresh = Function.needOverride;
	    EditPart.prototype.removeEditPartListener = Function.needOverride;
	    EditPart.prototype.removeEditPolicy = Function.needOverride;
	    EditPart.prototype.removeNotify = Function.needOverride;
	    EditPart.prototype.setFocus = Function.needOverride;
	    EditPart.prototype.setModel = Function.needOverride;
	    EditPart.prototype.setParent = Function.needOverride;
	    EditPart.prototype.setSelected = Function.needOverride;
	    EditPart.prototype.showSourceFeedback = Function.needOverride;
	    EditPart.prototype.showTargetFeedback = Function.needOverride;
	    EditPart.prototype.understandsRequest = Function.needOverride;
	    EditPart.prototype.getId = Function.needOverride;

	    //constants
	    EditPart.SELECTED_NONE = 0;
	    EditPart.SELECTED = 1;
	    EditPart.SELECTED_PRIMARY = 2;

	    return EditPart;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 130 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-22
	 * @interface
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require) {
	    'use strict';

	    var LayerConstants = {};

	    LayerConstants.PRIMARY_LAYER = "Primary Layer";
	    LayerConstants.CONNECTION_LAYER = "Connection Layer";
	    LayerConstants.GRID_LAYER = "Grid Layer";
	    LayerConstants.GUIDE_LAYER = "Guide Layer";
	    LayerConstants.HANDLE_LAYER = "Handle Layer";
	    LayerConstants.FEEDBACK_LAYER = "Feedback Layer";
	    LayerConstants.SCALED_FEEDBACK_LAYER = "Scaled Feedback Layer";
	    LayerConstants.PRINTABLE_LAYERS = "Printable Layers";
	    LayerConstants.SCALABLE_LAYERS = "Scalable Layers";

	    return LayerConstants;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 131 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require) {
	    'use strict';

	    var LayerManager = function() {};

	    LayerManager.ID = {};
	    LayerManager.Helper = {
	        find: function(part) {
	            return part.getViewer().getEditPartRegistry().get(LayerManager.ID);
	        }
	    };

	    return LayerManager;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 132 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-12
	 * @interface
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require) {
	    'use strict';

	    var EditPolicy = function() {

	    };
	    //method
	    EditPolicy.prototype.activate = Function.needOverride;
	    EditPolicy.prototype.deactivate = Function.needOverride;
	    EditPolicy.prototype.eraseSourceFeedback = Function.needOverride;
	    EditPolicy.prototype.eraseTargetFeedback = Function.needOverride;
	    EditPolicy.prototype.getCommand = Function.needOverride;
	    EditPolicy.prototype.getHost = Function.needOverride;
	    EditPolicy.prototype.getTargetEditPart = Function.needOverride;
	    EditPolicy.prototype.setHost = Function.needOverride;
	    EditPolicy.prototype.showSourceFeedback = Function.needOverride;
	    EditPolicy.prototype.showTargetFeedback = Function.needOverride;
	    EditPolicy.prototype.understandsRequest = Function.needOverride;


	    EditPolicy.COMPONENT_ROLE = 'ComponentEditPolicy';
	    EditPolicy.CONNECTION_ENDPOINTS_ROLE = 'Connection Endpoint Policy';
	    EditPolicy.CONNECTION_BENDPOINTS_ROLE = 'Connection Bendpoint Policy';
	    EditPolicy.CONNECTION_ROLE = 'ConnectionEditPolicy';
	    EditPolicy.CONTAINER_ROLE = 'ContainerEditPolicy';
	    EditPolicy.DIRECT_EDIT_ROLE = 'DirectEditPolicy';
	    EditPolicy.GRAPHICAL_NODE_ROLE = 'GraphicalNodeEditPolicy';
	    EditPolicy.LAYOUT_ROLE = 'LayoutEditPolicy';
	    EditPolicy.NODE_ROLE = 'NodeEditPolicy';
	    EditPolicy.PRIMARY_DRAG_ROLE = 'PrimaryDrag Policy';
	    EditPolicy.SELECTION_FEEDBACK_ROLE = 'Selection Feedback';
	    EditPolicy.TREE_CONTAINER_ROLE = 'TreeContainerEditPolicy';

	    return EditPolicy;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 133 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-22
	 * @interface
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require) {
	    'use strict';

	    var EditPartFactory = function() {

	    };
	    //method
	    EditPartFactory.prototype.createEditPart = Function.needOverride;

	    return EditPartFactory;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 134 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-12
	 * @interface
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require) {
	    'use strict';

	    var EditPartViewer = function() {};

	    EditPartViewer.prototype.addSelectionChangedListener = Function.needOverride;
	    EditPartViewer.prototype.getSelection = Function.needOverride;
	    EditPartViewer.prototype.removeSelectionChangedListener = Function.needOverride;
	    EditPartViewer.prototype.setSelection = Function.needOverride;
	    EditPartViewer.prototype.addDragSourceListener = Function.needOverride;
	    EditPartViewer.prototype.addDropTargetListener = Function.needOverride;
	    EditPartViewer.prototype.addPropertyChangeListener = Function.needOverride;
	    EditPartViewer.prototype.appendSelection = Function.needOverride;
	    EditPartViewer.prototype.createControl = Function.needOverride;
	    EditPartViewer.prototype.deselect = Function.needOverride;
	    EditPartViewer.prototype.deselectAll = Function.needOverride;
	    EditPartViewer.prototype.findObjectAt = Function.needOverride;
	    EditPartViewer.prototype.findObjectAtExcluding = Function.needOverride;
	    EditPartViewer.prototype.flush = Function.needOverride;
	    EditPartViewer.prototype.getContents = Function.needOverride;
	    EditPartViewer.prototype.getContextMenu = Function.needOverride;
	    EditPartViewer.prototype.getControl = Function.needOverride;
	    EditPartViewer.prototype.getEditDomain = Function.needOverride;
	    EditPartViewer.prototype.getEditPartFactory = Function.needOverride;
	    EditPartViewer.prototype.getEditPartRegistry = Function.needOverride;
	    EditPartViewer.prototype.getFocusEditPart = Function.needOverride;
	    EditPartViewer.prototype.getKeyHandler = Function.needOverride;
	    EditPartViewer.prototype.getProperty = Function.needOverride;
	    EditPartViewer.prototype.getResourceManager = Function.needOverride;
	    EditPartViewer.prototype.getRootEditPart = Function.needOverride;
	    EditPartViewer.prototype.getSelectedEditParts = Function.needOverride;
	    EditPartViewer.prototype.getSelection = Function.needOverride;
	    EditPartViewer.prototype.getSelectionManager = Function.needOverride;
	    EditPartViewer.prototype.getVisualPartMap = Function.needOverride;
	    EditPartViewer.prototype.removePropertyChangeListener = Function.needOverride;
	    EditPartViewer.prototype.reveal = Function.needOverride;
	    EditPartViewer.prototype.select = Function.needOverride;
	    EditPartViewer.prototype.setContents = Function.needOverride;
	    EditPartViewer.prototype.setContextMenu = Function.needOverride;
	    EditPartViewer.prototype.setControl = Function.needOverride;
	    EditPartViewer.prototype.setCursor = Function.needOverride;
	    EditPartViewer.prototype.setEditDomain = Function.needOverride;
	    EditPartViewer.prototype.setEditPartFactory = Function.needOverride;
	    EditPartViewer.prototype.setFocus = Function.needOverride;
	    EditPartViewer.prototype.setKeyHandler = Function.needOverride;
	    EditPartViewer.prototype.setProperty = Function.needOverride;
	    EditPartViewer.prototype.setRootEditPart = Function.needOverride;
	    EditPartViewer.prototype.setRouteEventsToEditDomain = Function.needOverride;
	    EditPartViewer.prototype.setSelectionManager = Function.needOverride;
	    EditPartViewer.prototype.setSelectionManager = Function.needOverride;

	    EditPartViewer.Conditional = function() {};
	    EditPartViewer.Conditional.prototype.evaluate = Function.needOverride;

	    return EditPartViewer;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 135 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-18
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    var Command = function(label) {

	        Command.superclass.constructor.call(this);
	        this.label = null;
	        this.debugLabel = null;

	        if (label != null) {
	            this.setLabel(label);
	        }
	    };

	    util.defineClass(Command, Object, {
	        canExecute: function() {
	            return true;
	        },

	        canUndo: function() {
	            return true;
	        },

	        chain: function(command) {
	            if (command == null) {
	                return this;
	            }
	            //var CompoundCommand = require('./CompoundCommand');
	            var compound = new Command.CompoundCommand();
	            compound.chain = function(c) {
	                this.add(c);
	                return this;
	            };
	            compound.setDebugLabel('Chained Commands'); //$NON-NLS-1$
	            compound.add(this);
	            compound.add(command);
	            return compound;
	        },

	        dispose: function() {

	        },

	        execute: function() {

	        },

	        getDebugLabel: function() {
	            return this.debugLabel + ' ' + this.getLabel();
	        },

	        getLabel: function() {
	            return this.label;
	        },

	        redo: function() {
	            this.execute();
	        },

	        setDebugLabel: function(label) {
	            this.debugLabel = label;
	        },

	        setLabel: function(label) {
	            this.label = label;
	        },

	        undo: function() {

	        }

	    });

	    Command.createCommand = function(obj) {
	        var command = new Command();
	        return Object.assign(command, obj);
	    };

	    Command.UNEXECUTABLE_COMMAND = (function() {
	        var c = new Command();
	        c.canExecute = function() { return false; };
	        c.canUndo = function() { return false; };
	        return c;
	    })();

	    Command.CompoundCommand = (function() {

	        var CompoundCommand = function() {
	            CompoundCommand.superclass.constructor.call(this);
	            this.commandList = [];
	        };

	        //static properties
	        util.defineClass(CompoundCommand, Command, {
	            add: function(command) {
	                if (command != null) {
	                    this.commandList.push(command);
	                }
	            },
	            canExecute: function() {
	                if (this.commandList.length == 0)
	                    return false;
	                for (var i = 0; i < this.commandList.length; i++) {
	                    var cmd = this.commandList[i];
	                    if (cmd == null)
	                        return false;
	                    if (!cmd.canExecute())
	                        return false;
	                }
	                return true;
	            },
	            canUndo: function() {
	                if (this.commandList.length == 0)
	                    return false;
	                for (var i = 0; i < this.commandList.length; i++) {
	                    var cmd = this.commandList[i];
	                    if (cmd == null)
	                        return false;
	                    if (!cmd.canUndo())
	                        return false;
	                }
	                return true;
	            },
	            dispose: function() {
	                this.commandList.forEach(function(command) {
	                    command.dispose();
	                });
	            },
	            execute: function() {
	                this.commandList.forEach(function(command) {
	                    command.execute();
	                });
	            },
	            getChildren: function() {
	                return this.commandList.concat();
	            },
	            getCommands: function() {
	                return this.commandList;
	            },
	            getLabel() {
	                var label = CompoundCommand.superclass.getLabel.call(this);
	                if (label == null)
	                    if (this.commandList.length == 0)
	                        return null;
	                if (label != null)
	                    return label;
	                return (this.commandList[0]).getLabel();
	            },
	            isEmpty: function() {
	                return this.commandList.length == 0;
	            },
	            redo: function() {
	                this.commandList.forEach(function(command) {
	                    command.redo();
	                });
	            },
	            size: function() {
	                return this.commandList.length;
	            },
	            undo: function() {
	                for (var i = this.commandList.length - 1; i >= 0; i--) {
	                    this.commandList[i].undo();
	                }
	            },
	            unwrap: function() {
	                switch (this.commandList.length) {
	                    case 0:
	                        return __webpack_require__(135).UNEXECUTABLE_COMMAND;
	                    case 1:
	                        return this.commandList[0];
	                    default:
	                        return this;
	                }
	            }

	        });

	        return CompoundCommand;

	    })();


	    return Command;

	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 136 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-18
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(137)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, CommandStackEvent) {
	    'use strict';

	    var CommandStack = function(label) {

	        CommandStack.superclass.constructor.call(this);
	        this.eventListeners = [];
	        this.redoable = []; //stack
	        this.saveLocation = 0;
	        this.undoable = []; //stack
	        this.undoLimit = 0;
	    };

	    util.defineClass(CommandStack, Object, {
	        /**
	         * @param listener {Function}
	         **/
	        addCommandStackEventListener: function(listener) {
	            this.eventListeners.push(listener);
	        },
	        canRedo: function() {
	            return this.redoable.length != 0;
	        },
	        canUndo: function() {
	            if (this.undoable.length == 0) {
	                return false;
	            }
	            return this.undoable[this.undoable.length - 1].canUndo();
	        },
	        dispose: function() {
	            this.flushUndo();
	            this.flushRedo();
	        },
	        execute: function(command) {
	            if (command == null || !command.canExecute()) {
	                return;
	            }
	            this.flushRedo();
	            this.notifyListeners(command, CommandStack.PRE_EXECUTE);
	            try {
	                command.execute();
	                if (this.getUndoLimit() > 0) {
	                    while (this.undoable.length >= this.getUndoLimit()) {
	                        this.undoable.shift().dispose();
	                        if (this.saveLocation > -1) {
	                            this.saveLocation--;
	                        }
	                    }
	                }
	                if (this.saveLocation > this.undoable.length) {
	                    this.saveLocation = -1;
	                }
	                this.undoable.push(command);
	            } catch (e) {
	                console.error(e);
	            } finally {
	                this.notifyListeners(command, CommandStack.POST_EXECUTE);
	            }
	        },
	        flush: function() {
	            this.flushRedo();
	            this.flushUndo();
	            this.saveLocation = 0;
	        },
	        flushRedo: function() {
	            while (this.redoable.length > 0) {
	                this.redoable.pop().dispose();
	            }
	        },
	        flushUndo: function() {
	            while (this.undoable.length > 0) {
	                this.undoable.pop().dispose();
	            }
	        },
	        getCommands: function() {
	            var commands = util.Array.copy(this.undoable);
	            for (var i = this.redoable.length - 1; i >= 0; i--) {
	                commands.push(this.redoable[i]);
	            }
	            return commands;
	        },
	        getRedoCommand: function() {
	            return this.redoable.length ? this.redoable[this.redoable.length - 1] : null;
	        },
	        getUndoCommand: function() {
	            return this.undoable.length ? this.undoable[this.undoable.length - 1] : null;
	        },
	        getUndoLimit: function() {
	            return this.undoLimit;
	        },
	        isDirty: function() {
	            return this.undoable.length != this.saveLocation;
	        },
	        markSaveLocation: function() {
	            this.saveLocation = this.undoable.length;
	        },
	        notifyListeners: function(command, state) {
	            var CommandStackEvent = __webpack_require__(137);
	            var event = new CommandStackEvent(this, command, state);
	            this.eventListeners.forEach(function(l) {
	                if ('function' == typeof l) {
	                    l(event);
	                }
	            });
	        },
	        redo: function() {
	            if (!this.canRedo()) {
	                return;
	            }
	            var command = this.redoable.pop();
	            this.notifyListeners(command, CommandStack.PRE_REDO);
	            try {
	                command.redo();
	                this.undoable.push(command);
	            } finally {
	                this.notifyListeners(command, CommandStack.POST_REDO);
	            }
	        },
	        removeCommandStackEventListener: function(listener) {
	            util.Array.remove(this.eventListeners, listener);
	        },
	        setUndoLimit: function(undoLimit) {
	            this.undoLimit = undoLimit;
	        },
	        undo: function() {
	            var command = this.undoable.pop();
	            this.notifyListeners(command, CommandStack.PRE_UNDO);
	            try {
	                command.undo();
	                this.redoable.push(command);
	            } finally {
	                this.notifyListeners(command, CommandStack.POST_UNDO);
	            }
	        }


	    });

	    CommandStack.POST_EXECUTE = 8;
	    CommandStack.POST_REDO = 16;
	    CommandStack.POST_UNDO = 32;
	    CommandStack.POST_MASK = (CommandStack.POST_EXECUTE | CommandStack.POST_UNDO | CommandStack.POST_REDO);
	    CommandStack.PRE_EXECUTE = 1;
	    CommandStack.PRE_REDO = 2;
	    CommandStack.PRE_UNDO = 4;
	    CommandStack.PRE_MASK = (CommandStack.PRE_EXECUTE | CommandStack.PRE_UNDO | CommandStack.PRE_REDO);

	    return CommandStack;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 137 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-19
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(138),
	    __webpack_require__(136)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, EventObject, CommandStack) {
	    'use strict';

	    var CommandStackEvent = function(stack, c, detail) {
	        CommandStackEvent.superclass.constructor.call(this, stack);
	        this.command = c;
	        this.detail = detail;
	    };
	    util.defineClass(CommandStackEvent, EventObject, {
	        getCommand: function() {
	            return this.command;
	        },
	        isPreChangeEvent: function() {
	            var CommandStack = __webpack_require__(136);
	            return 0 != (this.getDetail() & CommandStack.PRE_MASK);
	        },
	        isPostChangeEvent: function() {
	            var CommandStack = __webpack_require__(136);
	            return 0 != (this.getDetail() & CommandStack.POST_MASK);
	        },
	        getDetail: function() {
	            return this.detail;
	        }
	    });

	    return CommandStackEvent;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 138 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-19
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    var EventObject = function(source) {
	        if (source == null) {
	            throw { 'type': '空值', 'message': 'source为空' };
	        }
	        this.source = source;

	    };
	    util.defineClass(EventObject, Object, {
	        getSource: function() {
	            return this.source;
	        },
	        toString: function() {
	            return 'EventObject' + '[source=' + this.source + ']';
	        }
	    });

	    return EventObject;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 139 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-5-8
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(107),
	    __webpack_require__(102)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Canvas, EventDispatcher) {
	    'use strict';

	    var DomainEventDispatcher = function(domain, viewer) {
	        DomainEventDispatcher.superclass.constructor.call(this, domain, viewer);
	        this.domain = domain;
	        this.viewer = viewer;
	        this.editorCaptured = false;
	        this.setEnableKeyTraversal(false);
	        this.overrideCursor = null;
	    };
	    util.defineClass(DomainEventDispatcher, EventDispatcher, { //EventDispatcher
	        dispatchFocusGained: function(event) {
	            DomainEventDispatcher.superclass.dispatchFocusGained.call(this, event);
	            this.domain.focusGained(event, this.viewer);
	        },
	        dispatchFocusLost: function(event) {
	            DomainEventDispatcher.superclass.dispatchFocusLost.call(this, event);
	            this.domain.focusLost(event, this.viewer);
	            this.setRouteEventsToEditor(false);
	        },
	        _superDispatch: function(type, e) {
	            if (!this.editorCaptured) {
	                DomainEventDispatcher.superclass[type].call(this, e);
	                if (this.draw2dBusy()) {
	                    return true;
	                }
	            }
	        },
	        _internalDispatch: function(type, domainType, e) {
	            if (this._superDispatch(type, e)) {
	                return;
	            }
	            if (this.okToDispatch()) {
	                this.domain[domainType](e, this.viewer);
	            }

	        },
	        dispatchKeyPressed: function(e) {
	            this._internalDispatch('dispatchKeyPressed', 'keyPressed', e);
	        },
	        dispatchKeyReleased: function(e) {
	            this._internalDispatch('dispatchKeyReleased', 'keyUp', e);
	        },
	        dispatchKeyDown: function(e) {
	            this._internalDispatch('dispatchKeyDown', 'keyDown', e);
	        },
	        dispatchMouseWheelScrolled: function(e) {
	            this._internalDispatch('dispatchMouseWheelScrolled', 'mouseWheelScrolled', e);
	        },
	        dispatchMouseHover: function(me) {
	            this._internalDispatch('dispatchMouseHover', 'mouseHover', me);
	        },
	        dispatchMouseDoubleClicked: function(me) {
	            this._internalDispatch('dispatchMouseDoubleClicked', 'mouseDoubleClick', me);
	        },
	        dispatchMouseClicked: function(me) {
	            this._internalDispatch('dispatchMouseClicked', 'mouseClick', me);
	        },
	        dispatchMouseEntered: function(me) {
	            this._internalDispatch('dispatchMouseEntered', 'viewerEntered', me);
	        },
	        dispatchMouseExited: function(me) {
	            //Do nothing now.
	        },
	        dispatchMousePressed: function(me) {
	            //避免有时mouseup丢失引起的问题.---------------
	            this.setCapture(null);
	            this.setRouteEventsToEditor(false);
	            //-----------------------------------------

	            if (this._superDispatch('dispatchMousePressed', me)) {
	                return;
	            }

	            if (this.okToDispatch()) {
	                this.setFocus(null);
	                //canvas cannot get focus in html5.
	                //this.control.forceFocus();
	                this.setRouteEventsToEditor(true);
	                this.domain.mouseDown(me, this.viewer);
	            }
	        },
	        dispatchMouseMoved: function(me) {
	            if (this._superDispatch('dispatchMouseMoved', me)) {
	                return;
	            }
	            if (this.okToDispatch()) {
	                //drag or move
	                if (me.button == Canvas.BUTTON_LEFT) { //Canvas
	                    this.domain.mouseDrag(me, this.viewer);
	                } else {
	                    this.domain.mouseMove(me, this.viewer);
	                }
	            }
	        },
	        dispatchMouseReleased: function(me) {
	            if (this._superDispatch('dispatchMouseReleased', me)) {
	                return;
	            }
	            if (this.okToDispatch()) {
	                this.setRouteEventsToEditor(false);
	                this.domain.mouseUp(me, this.viewer);
	                this.updateFigureUnderCursor(me);
	            }
	        },
	        /**
	         * 触摸开始
	         */
	        dispatchTouchStart: function(te) {
	            this._internalDispatch('dispatchTouchStart', 'touchStart', te);
	        },
	        /**
	         * 触摸移动
	         */
	        dispatchTouchMove: function(te) {
	            this._internalDispatch('dispatchTouchMove', 'touchMove', te);
	        },
	        /**
	         * 触摸结束
	         */
	        dispatchTouchEnd: function(te) {
	            this._internalDispatch('dispatchTouchEnd', 'touchEnd', te);
	        },
	        dispatchNativeDragFinished: function(event, viewer) {
	            this.domain.nativeDragFinished(event, viewer);
	        },
	        dispatchNativeDragStarted: function(event, viewer) {
	            this.setRouteEventsToEditor(false);
	            this.bedomainnch.nativeDragStarted(event, viewer);
	        },
	        draw2dBusy: function() {
	            if (this.getCurrentEvent() != null) {
	                if (this.getCurrentEvent().isConsumed()) {
	                    return true;
	                }
	            }
	            if (this.isCaptured()) {
	                return true;
	            }
	            return false;
	        },
	        getViewer: function() {
	            return this.viewer;
	        },
	        okToDispatch: function() {
	            return this.domain != null;
	        },
	        setCapture: function(figure) {
	            DomainEventDispatcher.superclass.setCapture.call(this, figure);
	            if (figure == null) {
	                this.releaseCapture();
	                this.setRouteEventsToEditor(true);
	            }
	        },
	        setCursor: function(newCursor) {
	            var cursor = this.overrideCursor || newCursor;
	            DomainEventDispatcher.superclass.setCursor.call(this, cursor);
	        },
	        setRouteEventsToEditor: function(value) {
	            this.editorCaptured = value;
	        },
	        setOverrideCursor: function(newCursor) {
	            if (this.overrideCursor == newCursor) {
	                return;
	            }
	            this.overrideCursor = newCursor;
	            if (this.overrideCursor == null) {
	                this.updateCursor();
	            } else {
	                this.setCursor(this.overrideCursor);
	            }
	        }

	    });

	    return DomainEventDispatcher;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 140 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-22
	 * @interface
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require) {
	    'use strict';

	    var RequestConstants = {};
	    //constants
	    RequestConstants.REQ_CONNECTION_START = "connection start";
	    RequestConstants.REQ_CONNECTION_END = "connection end";
	    RequestConstants.REQ_RECONNECT_SOURCE = "Reconnection source";
	    RequestConstants.REQ_RECONNECT_TARGET = "Reconnection target";
	    RequestConstants.REQ_MOVE_BENDPOINT = "move bendpoint";
	    RequestConstants.REQ_CREATE_BENDPOINT = "create bendpoint";
	    RequestConstants.REQ_RESIZE = "resize";
	    RequestConstants.REQ_RESIZE_CHILDREN = "resize children";
	    RequestConstants.REQ_MOVE = "move";
	    RequestConstants.REQ_MOVE_CHILDREN = "move children";
	    RequestConstants.REQ_OPEN = "open";
	    RequestConstants.REQ_ORPHAN = "orphan";
	    RequestConstants.REQ_ORPHAN_CHILDREN = "orphan children";
	    RequestConstants.REQ_CREATE = "create child";
	    RequestConstants.REQ_ADD = "add children";
	    RequestConstants.REQ_CLONE = "clone";
	    RequestConstants.REQ_DELETE = "delete";
	    RequestConstants.REQ_DELETE_DEPENDANT = "delete dependant";
	    RequestConstants.REQ_ALIGN = "align";
	    RequestConstants.REQ_ALIGN_CHILDREN = "align children";
	    RequestConstants.REQ_DIRECT_EDIT = "direct edit";
	    RequestConstants.REQ_SELECTION = "selection";
	    RequestConstants.REQ_SELECTION_HOVER = "selection hover";

	    return RequestConstants;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 141 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-16
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(5)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Map) {
	    'use strict';

	    var Request = function(type) {

	        Request.superclass.constructor.call(this, type);
	        this.type = null;
	        this.extendedData = null;

	        if (type != null) {
	            this.setType(type);
	        }
	    };

	    util.defineClass(Request, Object, {
	        getExtendedData: function() {
	            if (this.extendedData == null) {
	                this.extendedData = new Map();
	            }
	            return this.extendedData;
	        },

	        getType: function() {
	            return this.type;
	        },

	        setExtendedData: function(map) {
	            this.extendedData = map;
	        },

	        setType: function(type) {
	            this.type = type;
	        }
	    });

	    return Request;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 142 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; /**
	  * @author jiangqifan
	  * @since 2013-4-9
	  *
	  */
	 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	     __webpack_require__,
	     __webpack_require__(3),
	     __webpack_require__(129)
	 ], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, EditPart) {
	     'use strict';

	     var SelectionManager = function() {
	         SelectionManager.superclass.constructor.call(this);
	         this.focusPart = null;
	         this.selection = null;
	         this.viewer = null;

	     };
	     //method
	     util.defineClass(SelectionManager, Object, {
	         /**
	          * 将一个editPart加入到选择列表中。
	          * @param {EditPart} editpart
	          */
	         appendSelection: function(editpart) {
	             var primary; //当前选中的editPart
	             if (editpart != this.getFocus()) {
	                 this.viewer.setFocus(null);
	             }
	             if (this.selection.length > 0) {
	                 primary = this.selection[this.selection.length - 1];
	                 primary.setSelected(EditPart.SELECTED); //EditPart.SELECTED
	             }
	             util.Array.remove(this.selection, editpart); //util.Array.remove
	             this.selection.push(editpart);
	             editpart.setSelected(EditPart.SELECTED_PRIMARY); //EditPart.SELECTED_PRIMARY

	             this.fireSelectionChanged();
	         },
	         /**
	          * 取消对某个editPart的选择
	          * @param {EditPart} editpart
	          */
	         deselect: function(editpart) {
	             var primaryCandidate; //候选的可以作为选中元素的editpart
	             editpart.setSelected(EditPart.SELECTED_NONE); //EditPart.SELECTED_NONE
	             util.Array.remove(this.selection, editpart); //util.Array.remove
	             if (this.selection.length > 0) {
	                 for (var i = this.selection.length - 1; i >= 0; i--) {
	                     primaryCandidate = this.selection[i];
	                     if (primaryCandidate.isSelectable()) {
	                         primaryCandidate.setSelected(EditPart.SELECTED_PRIMARY); //EditPart.SELECTED_PRIMARY
	                         break;
	                     }
	                 }
	             }
	             this.fireSelectionChanged();
	         },

	         deselectAll: function() {
	             var part;
	             this.setFocus(null);
	             for (var i = 0; i < this.selection.length; i++) {
	                 part = this.selection[i];
	                 part.setSelected(EditPart.SELECTED_NONE); //EditPart.SELECTED_NONE
	             }
	             //清除数组所有元素，但不重新创建数组对象
	             this.selection.length = 0;
	             this.fireSelectionChanged();
	         },

	         fireSelectionChanged: function() {
	             if ('function' === typeof this.notifier) {
	                 this.notifier();
	             }
	         },

	         getFocus: function() {
	             return this.focusPart;
	         },
	         /**
	          * 获取当前选中元素，如果没有当前选中元素，则返回viewer的contents.
	          * @type {Array}
	          */
	         getSelection: function() {
	             if (this.selection.length === 0 && this.viewer.getContents() != null) {
	                 return [this.viewer.getContents()];
	             }
	             return this.selection;
	         },

	         getViewer: function() {
	             return this.viewer;
	         },

	         internalHookControl: Function.emptyFunction,

	         internalUninstall: Function.emptyFunction,

	         hookViewer: Function.emptyFunction,

	         internalInitialize: function(viewer, selection, notifier) {
	             this.viewer = viewer;
	             this.selection = selection;
	             this.notifier = notifier;
	             this.hookViewer(viewer);
	         },

	         setFocus: function(part) {
	             if (this.focusPart === part) {
	                 return;
	             }
	             if (this.focusPart != null) {
	                 this.focusPart.setFocus(false);
	             }
	             this.focusPart = part;
	             if (this.focusPart != null) {
	                 this.focusPart.setFocus(true);
	             }
	         },
	         /**
	          *
	          * @param {Array} newSelection
	          */
	         setSelection: function(newSelection) {
	             if (newSelection == null || !util.Array.isArray(newSelection)) { //util.Array.isArray
	                 return;
	             }
	             var part;
	             var i;
	             for (i = 0; i < this.selection.length; i++) {
	                 part = this.selection[i];
	                 if (!util.Array.contains(newSelection, part)) {
	                     part.setSelected(EditPart.SELECTED_NONE); //EditPart.SELECTED_NONE
	                 }
	             }
	             this.selection.length = 0;
	             if (newSelection.length > 0) {
	                 for (i = 0; i < newSelection.length; i++) {
	                     part = newSelection[i];
	                     this.selection.push(part);
	                     if (i === newSelection.length - 1) {
	                         part.setSelected(EditPart.SELECTED_PRIMARY); //EditPart.SELECTED_PRIMARY
	                         break;
	                     }
	                     part.setSelected(EditPart.SELECTED); //EditPart.SELECTED
	                 }
	             }
	             this.fireSelectionChanged();
	         }

	     });

	     //static
	     SelectionManager.createDefault = function() {
	         return new SelectionManager();
	     };

	     return SelectionManager;
	 }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 143 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-16
	 * @interface
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require) {
	    'use strict';

	    var Tool = function() {

	    };
	    //method
	    Tool.prototype.activate = Function.needOverride;
	    Tool.prototype.deactivate = Function.needOverride;
	    Tool.prototype.focusGained = Function.needOverride;
	    Tool.prototype.focusLost = Function.needOverride;
	    Tool.prototype.keyDown = Function.needOverride;
	    Tool.prototype.keyTraversed = Function.needOverride;
	    Tool.prototype.keyPressed = Function.needOverride;
	    Tool.prototype.keyUp = Function.needOverride;
	    Tool.prototype.mouseDoubleClick = Function.needOverride;
	    Tool.prototype.mouseDown = Function.needOverride;
	    Tool.prototype.mouseDrag = Function.needOverride;
	    Tool.prototype.mouseHover = Function.needOverride;
	    Tool.prototype.mouseMove = Function.needOverride;
	    Tool.prototype.mouseUp = Function.needOverride;
	    Tool.prototype.mouseWheelScrolled = Function.needOverride;
	    Tool.prototype.nativeDragFinished = Function.needOverride;
	    Tool.prototype.nativeDragStarted = Function.needOverride;
	    Tool.prototype.setEditDomain = Function.needOverride;
	    Tool.prototype.setViewer = Function.needOverride;
	    Tool.prototype.viewerEntered = Function.needOverride;
	    Tool.prototype.viewerExited = Function.needOverride;
	    Tool.prototype.setProperties = Function.needOverride;

	    return Tool;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 144 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-22
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(136),
	    __webpack_require__(145),
	    __webpack_require__(5)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, CommandStack, SelectionTool, Map) {
	    'use strict';

	    var EditDomain = function(shell) {
	        EditDomain.superclass.constructor.call(this);
	        util.supportEventEmitter(this);

	        this.shell = shell;
	        this.defaultTool = null;
	        this.activeTool = null;
	        this.viewers = [];
	        this.listeners = new Map();
	        this.commandStack = new CommandStack();

	        this.loadDefaultTool();
	    };

	    util.defineClass(EditDomain, Object, {
	        dispose: function() {
	            this.shell = null;
	            if (this.defaultTool && this.defaultTool.dispose) {
	                this.defaultTool.dispose();
	            }
	            this.defaultTool = null;
	            this.viewers = null;
	            this.commandStack = null;
	        },
	        addViewer: function(viewer) {
	            viewer.setEditDomain(this);
	            //if (!viewers.contains(viewer))
	            // viewers.add(viewer);
	            this.getControl().appendChild(viewer.getElement());
	            this.viewers[0] = viewer;
	        },
	        getControl: function() {
	            return this.shell;
	        },
	        focusGained: function(event, viewer) {
	            var tool = this.getActiveTool();
	            if (tool != null) {
	                tool.focusGained(event, viewer);
	            }
	        },
	        focusLost: function(event, viewer) {
	            var tool = this.getActiveTool();
	            if (tool != null) {
	                tool.focusLost(event, viewer);
	            }
	        },
	        getActiveTool: function() {
	            return this.activeTool;
	        },
	        getCommandStack: function() {
	            return this.commandStack;
	        },
	        getDefaultTool: function() {
	            if (this.defaultTool == null) {
	                this.defaultTool = new SelectionTool();
	            }
	            return this.defaultTool;
	        },

	        // getPaletteViewer
	        // handlePaletteToolChanged

	        _internalDispatch: function(type, e, viewer) {
	            var tool = this.getActiveTool();
	            if (tool != null && tool[type]) {
	                tool[type](e, viewer);
	            }
	        },
	        keyDown: function(keyEvent, viewer) {
	            this._internalDispatch('keyDown', keyEvent, viewer);
	        },
	        keyPressed: function(keyEvent, viewer) {
	            this._internalDispatch('keyPressed', keyEvent, viewer);
	        },
	        // keyTraversed

	        keyUp: function(keyEvent, viewer) {
	            this._internalDispatch('keyUp', keyEvent, viewer);
	        },
	        loadDefaultTool: function() {
	            this.setActiveTool(null);
	            // var paletteViewer = this.getPaletteViewer();
	            // if (this.paletteRoot != null && paletteViewer != null) {
	            // if (this.paletteRoot.getDefaultEntry() != null) {
	            // paletteViewer.setActiveTool(this.paletteRoot.getDefaultEntry());
	            // return;
	            // } else {
	            // paletteViewer.setActiveTool(null);
	            // }
	            // }
	            this.setActiveTool(this.getDefaultTool());
	        },
	        mouseDoubleClick: function(mouseEvent, viewer) {
	            this._internalDispatch('mouseDoubleClick', mouseEvent, viewer);
	        },
	        mouseClick: function(mouseEvent, viewer) {
	            this._internalDispatch('mouseClick', mouseEvent, viewer);
	        },
	        mouseDown: function(mouseEvent, viewer) {
	            this._internalDispatch('mouseDown', mouseEvent, viewer);
	        },
	        mouseDrag: function(mouseEvent, viewer) {
	            this._internalDispatch('mouseDrag', mouseEvent, viewer);
	        },
	        mouseHover: function(mouseEvent, viewer) {
	            this._internalDispatch('mouseHover', mouseEvent, viewer);
	        },
	        mouseMove: function(mouseEvent, viewer) {
	            this._internalDispatch('mouseMove', mouseEvent, viewer);
	        },
	        mouseUp: function(mouseEvent, viewer) {
	            this._internalDispatch('mouseUp', mouseEvent, viewer);
	        },
	        mouseWheelScrolled: function(event, viewer) {
	            this._internalDispatch('mouseWheelScrolled', event, viewer);
	        },
	        nativeDragFinished: function(event, viewer) {
	            this._internalDispatch('nativeDragFinished', event, viewer);
	        },
	        nativeDragStarted: function(event, viewer) {
	            this._internalDispatch('nativeDragStarted', event, viewer);
	        },
	        touchStart: function(touchEvent, viewer) {
	            this._internalDispatch('touchStart', touchEvent, viewer);
	        },
	        touchMove: function(touchEvent, viewer) {
	            this._internalDispatch('touchMove', touchEvent, viewer);
	        },
	        touchEnd: function(touchEvent, viewer) {
	            this._internalDispatch('touchEnd', touchEvent, viewer);
	        },
	        removeViewer: function(viewer) {
	            if (this.viewers.remove(viewer)) {
	                viewer.setEditDomain(null);
	            }
	        },
	        setCommandStack: function(stack) {
	            this.commandStack = stack;
	        },
	        setDefaultTool: function(tool) {
	            this.defaultTool = tool;
	        },
	        setPaletteRoot: function(root) {
	            if (this.paletteRoot == root) {
	                return;
	            }
	            this.paletteRoot = root;
	            if (this.getPaletteViewer() != null) {
	                this.getPaletteViewer().setPaletteRoot(this.paletteRoot);
	                this.loadDefaultTool();
	            }
	        },
	        setPaletteViewer: function(palette) {
	            if (palette == this.paletteViewer) {
	                return;
	            }
	            if (this.paletteViewer != null) {
	                this.paletteViewer.removePaletteListener(this.paletteListener);
	            }
	            this.paletteViewer = palette;
	            if (this.paletteViewer != null) {
	                palette.addPaletteListener(this.paletteListener);
	                if (this.paletteRoot != null) {
	                    this.paletteViewer.setPaletteRoot(this.paletteRoot);
	                    this.loadDefaultTool();
	                }
	            }
	        },
	        setActiveTool: function(tool) {
	            if (this.activeTool != null) {
	                this.activeTool.deactivate();
	            }
	            this.activeTool = tool;
	            if (this.activeTool != null) {
	                this.activeTool.setEditDomain(this);
	                this.activeTool.activate();
	            }
	            this.emit('toolChanged', this.activeTool);
	        },
	        viewerEntered: function(mouseEvent, viewer) {
	            this._internalDispatch('viewerEntered', mouseEvent, viewer);
	        },
	        viewerExited: function(mouseEvent, viewer) {
	            this._internalDispatch('viewerExited', mouseEvent, viewer);
	        }
	    });

	    return EditDomain;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 145 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-5-8
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(146),
	    __webpack_require__(147),
	    __webpack_require__(150),
	    __webpack_require__(140),
	    __webpack_require__(151),
	    __webpack_require__(126)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    TargetingTool,
	    AbstractTool,
	    LocationRequest,
	    RequestConstants,
	    SelectionRequest,
	    Mouse
	) {
	    'use strict';

	    var SelectionTool = function() {
	        SelectionTool.superclass.constructor.call(this);
	        this.handleIndex = null;
	        this.dragTracker = null;
	        this.hoverRequest = null;
	    };

	    util.defineClass(SelectionTool, TargetingTool, {
	        acceptTraverseHandle: function(e) {
	            return (e.charCode == '.'.charCodeAt(0) || e.charCode == '>'.charCodeAt(0)) && this.isInState(AbstractTool.STATE_INITIAL |
	                AbstractTool.STATE_ACCESSIBLE_DRAG |
	                AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS) && !e.altKey && !e.ctrlKey;
	        },
	        createHoverRequest: function() {
	            this.hoverRequest = new LocationRequest();
	            this.hoverRequest.setType(RequestConstants.REQ_SELECTION_HOVER);
	        },
	        createTargetRequest: function() {
	            var request = new SelectionRequest();
	            request.setType(this.getCommandName());
	            return request;
	        },
	        deactivate: function() {
	            this.setDragTracker(null);
	            SelectionTool.superclass.deactivate.call(this);
	        },
	        eraseHoverFeedback: function() {
	            if (this.getTargetEditPart() == null) {
	                return;
	            }
	            if (this.getTargetHoverRequest() == null) {
	                return;
	            }
	            this.getTargetEditPart().eraseTargetFeedback(this.getTargetHoverRequest());
	        },
	        getCommandName: function() {
	            return RequestConstants.REQ_SELECTION;
	        },
	        getDragTracker: function() {
	            return this.dragTracker;
	        },
	        getTargetHoverRequest: function() {
	            if (this.hoverRequest == null) {
	                this.createHoverRequest();
	            }
	            return this.hoverRequest;
	        },
	        handleDoubleClick: function(button) {
	            var viewer = this.getCurrentViewer();
	            var p = this.getLocation();
	            if (this.getDragTracker() != null) {
	                this.getDragTracker().deactivate();
	            }
	            var handle = viewer.findHandleAt(p);
	            if (handle != null) {
	                this.setDragTracker(handle.getDragTracker());
	                return true;
	            }
	            this.updateTargetRequest();
	            this.getTargetRequest().setLastButtonPressed(button);
	            this.updateTargetUnderMouse();
	            var editpart = this.getTargetEditPart();
	            if (editpart != null) {
	                this.setDragTracker(editpart.getDragTracker(this.getTargetRequest()));
	                this.lockTargetEditPart(editpart);
	                return true;
	            }
	            return false;
	        },
	        handleButtonDown: function(button) {
	            if (!this.stateTransition(AbstractTool.STATE_INITIAL, AbstractTool.STATE_DRAG)) {
	                this.resetHover();
	                return true;
	            }
	            this.resetHover();
	            var viewer = this.getCurrentViewer();
	            var p = this.getLocation();
	            if (this.getDragTracker() != null) {
	                this.getDragTracker().deactivate();
	            }
	            var handle = viewer.findHandleAt(p);
	            if (handle != null) {
	                this.setDragTracker(handle.getDragTracker());
	                return true;
	            }
	            this.updateTargetRequest();
	            this.getTargetRequest().setLastButtonPressed(button);
	            this.updateTargetUnderMouse();
	            var editpart = this.getTargetEditPart();
	            if (editpart != null) {
	                this.setDragTracker(editpart.getDragTracker(this.getTargetRequest()));
	                this.lockTargetEditPart(editpart);
	                return true;
	            }
	            return false;
	        },
	        touchStart: function(e, viewer) {
	            SelectionTool.superclass.touchStart.call(this, e, viewer);
	            if (this.getDragTracker() != null && this.getDragTracker().touchStart) {
	                this.getDragTracker().touchStart(e, viewer);
	            }
	        },
	        touchMove: function(e, viewer) {
	            if (this.getDragTracker() != null && this.getDragTracker().touchMove) {
	                this.getDragTracker().touchMove(e, viewer);
	            }
	            SelectionTool.superclass.touchMove.call(this, e, viewer);
	        },
	        touchEnd: function(e, viewer) {
	            if (this.getDragTracker() != null && this.getDragTracker().touchEnd) {
	                this.getDragTracker().touchEnd(e, viewer);
	            }
	            SelectionTool.superclass.touchEnd.call(this, e, viewer);
	        },
	        handleTouchStart: function() {
	            var viewer = this.getCurrentViewer();
	            var p = this.getLocation();
	            if (this.getDragTracker() != null) {
	                this.getDragTracker().deactivate();
	            }
	            var handle = viewer.findHandleAt(p);
	            if (handle != null) {
	                this.setDragTracker(handle.getDragTracker());
	                return true;
	            }
	            this.updateTargetRequest();
	            this.updateTargetUnderMouse();
	            var editpart = this.getTargetEditPart();
	            if (editpart != null) {
	                this.setDragTracker(editpart.getDragTracker(this.getTargetRequest()));
	                return true;
	            }
	            return false;
	        },
	        handleTouchEnd: function() {
	            this.getTargetRequest().setLastButtonPressed(0);
	            this.setDragTracker(null);
	            this.unlockTargetEditPart();
	            return true;
	        },
	        handleButtonUp: function(button) {
	            if (this.getCurrentInput().isAnyButtonDown()) {
	                return false;
	            }
	            this.getTargetRequest().setLastButtonPressed(0);
	            this.setDragTracker(null);
	            this.setState(AbstractTool.STATE_INITIAL);
	            this.unlockTargetEditPart();
	            return true;
	        },
	        handleCommandStackChanged: function() {
	            if (this.getDragTracker() == null) {
	                SelectionTool.superclass.handleCommandStackChanged.call(this);
	            }
	            return false;
	        },
	        handleFocusLost: function() {
	            if (this.isInState(AbstractTool.STATE_ACCESSIBLE_DRAG | AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS | AbstractTool.STATE_DRAG | AbstractTool.STATE_DRAG_IN_PROGRESS)) {
	                if (this.getDragTracker() != null) {
	                    this.setState(AbstractTool.STATE_INITIAL);
	                }
	                return true;
	            }
	            return false;
	        },
	        //handleHover
	        //handleHoverStop
	        handleKeyDown: function(e) {
	            this.resetHover();
	            if (this.acceptArrowKey(e)) {
	                if (this.stateTransition(AbstractTool.STATE_ACCESSIBLE_DRAG, AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS)) {
	                    return true;
	                }
	            }
	            if (this.acceptAbort(e)) {
	                if (this.getDragTracker() != null) {
	                    this.setDragTracker(null);
	                }
	                if (this.isInState(AbstractTool.STATE_TRAVERSE_HANDLE | AbstractTool.STATE_ACCESSIBLE_DRAG | AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS)) {
	                    this.placeMouseInViewer(this.getStartLocation().getTranslated(6, 6));
	                }
	                this.setState(AbstractTool.STATE_INITIAL);
	                this.setLastHandleProvider(null);
	                return true;
	            }
	            if (this.acceptTraverseHandle(e)) {
	                if (this.isInState(AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS)) {
	                    if (this.getDragTracker() != null) {
	                        this.getDragTracker().commitDrag();
	                    }
	                }
	                if (this.isInState(AbstractTool.STATE_ACCESSIBLE_DRAG | AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS)) {
	                    this.setDragTracker(null);
	                    this.getCurrentViewer().flush();
	                }
	                if (!this.handleTraverseHandle(e)) {
	                    this.setState(AbstractTool.STATE_INITIAL);
	                }
	                return true;
	            }
	            if (this.acceptDragCommit(e)) {
	                if (this.getDragTracker() != null) {
	                    this.getDragTracker().commitDrag();
	                }
	                this.setDragTracker(null);
	                this.setState(AbstractTool.STATE_INITIAL);
	                this.handleIndex--;
	                this.placeMouseInViewer(this.getLocation().getTranslated(6, 6));
	                return true;
	            }
	            if (this.isInState(AbstractTool.STATE_INITIAL)) {
	                this._performHandleKey('keyDown', e);
	            }
	            return false;
	        },
	        handleKeyPressed: function(e) {
	            if (this.isInState(AbstractTool.STATE_INITIAL)) {
	                this._performHandleKey('keyPressed', e);
	            }
	            return false;
	        },
	        handleKeyUp: function(e) {
	            if (this.isInState(AbstractTool.STATE_INITIAL)) {
	                this._performHandleKey('keyReleased', e);
	            }
	            return false;
	        },
	        _performHandleKey: function(method, e) {
	            var handler = this.getCurrentViewer().getKeyHandler();
	            if (handler && handler[method]) {
	                handler[method](e);
	            }
	        },
	        handleMove: function() {
	            if (this.stateTransition(AbstractTool.STATE_ACCESSIBLE_DRAG, AbstractTool.STATE_INITIAL)) {
	                this.setDragTracker(null);
	            }
	            if (this.isInState(AbstractTool.STATE_INITIAL)) {
	                this.updateTargetRequest();
	                this.updateTargetUnderMouse();
	                this.showTargetFeedback();
	                return true;
	            } else if (this.isInState(AbstractTool.STATE_TRAVERSE_HANDLE)) {
	                var viewer = this.getCurrentViewer();
	                var handle = viewer.findHandleAt(this.getLocation());
	                if (handle != null) {
	                    this.setState(AbstractTool.STATE_ACCESSIBLE_DRAG);
	                    this.setStartLocation(this.getLocation());
	                    this.setDragTracker(handle.getDragTracker());
	                    return true;
	                } else {
	                    this.setState(AbstractTool.STATE_INITIAL);
	                }

	            }
	            return false;
	        },
	        //handleNativeDragFinished
	        //handleNativeDragStarted
	        keyDown: function(evt, viewer) {
	            if (this.getDragTracker() != null) {
	                this.getDragTracker().keyDown(evt, viewer);
	            }
	            SelectionTool.superclass.keyDown.call(this, evt, viewer);
	        },
	        keyUp: function(evt, viewer) {
	            if (this.getDragTracker() != null) {
	                this.getDragTracker().keyUp(evt, viewer);
	            }
	            SelectionTool.superclass.keyUp.call(this, evt, viewer);
	        },
	        mouseDown: function(e, viewer) {
	            SelectionTool.superclass.mouseDown.call(this, e, viewer);
	            if (this.getDragTracker() != null) {
	                this.getDragTracker().mouseDown(e, viewer);
	            }
	        },
	        mouseDoubleClick: function(e, viewer) {
	            SelectionTool.superclass.mouseDoubleClick.call(this, e, viewer);

	            if (this.getDragTracker() != null) {
	                this.getDragTracker().mouseDoubleClick(e, viewer);
	            }

	            this.handleButtonUp(Mouse.getMouseNumber(e));
	        },
	        mouseDrag: function(e, viewer) {
	            if (this.getDragTracker() != null) {
	                this.getDragTracker().mouseDrag(e, viewer);
	            }
	            SelectionTool.superclass.mouseDrag.call(this, e, viewer);
	        },
	        mouseHover: function(e, viewer) {
	            if (this.getDragTracker() != null) {
	                this.getDragTracker().mouseHover(e, viewer);
	            }
	            SelectionTool.superclass.mouseHover.call(this, e, viewer);
	        },
	        mouseMove: function(e, viewer) {
	            if (this.getDragTracker() != null) {
	                this.getDragTracker().mouseMove(e, viewer);
	            }
	            SelectionTool.superclass.mouseMove.call(this, e, viewer);
	        },
	        mouseUp: function(e, viewer) {
	            if (this.getDragTracker() != null) {
	                this.getDragTracker().mouseUp(e, viewer);
	            }
	            SelectionTool.superclass.mouseUp.call(this, e, viewer);
	        },
	        mouseWheelScrolled: function(e, viewer) {
	            if (this.getDragTracker() != null) {
	                this.getDragTracker().mouseWheelScrolled(event, viewer);
	                event.doit = false;
	            } else {
	                SelectionTool.superclass.mouseWheelScrolled.call(this, e, viewer);
	            }
	        },
	        refreshCursor: function() {
	            if (this.getDragTracker() == null) {
	                SelectionTool.superclass.refreshCursor.call(this);
	            }
	        },
	        setDragTracker: function(newDragTracker) {
	            if (newDragTracker == this.dragTracker) {
	                return;
	            }
	            if (this.dragTracker != null) {
	                this.dragTracker.deactivate();
	            }
	            this.dragTracker = newDragTracker;
	            if (newDragTracker != null) {
	                newDragTracker.setEditDomain(this.getDomain());
	                newDragTracker.activate();
	                newDragTracker.setViewer(this.getCurrentViewer());
	            }
	            this.refreshCursor();
	        },
	        //showHoverFeedback
	        updateHoverRequest: function() {
	            var request = this.getTargetHoverRequest();
	            request.setLocation(this.getLocation());
	        },
	        updateTargetRequest: function() {
	            var request = this.getTargetRequest();
	            request.setModifiers(this.getCurrentInput().getModifiers());
	            request.setType(this.getCommandName());
	            request.setLocation(this.getLocation());
	            this.updateHoverRequest();
	        }

	    });
	    SelectionTool.FLAG_HOVER_FEEDBACK = TargetingTool.MAX_FLAG << 1;
	    SelectionTool.MAX_FLAG = SelectionTool.FLAG_HOVER_FEEDBACK;
	    SelectionTool.STATE_TRAVERSE_HANDLE = AbstractTool.MAX_STATE << 1;
	    SelectionTool.MAX_STATE = SelectionTool.STATE_TRAVERSE_HANDLE;

	    return SelectionTool;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 146 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-5-8
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(147),
	    __webpack_require__(141),
	    __webpack_require__(135),
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractTool, Request, Command) {
	    'use strict';

	    var TargetingTool = function() {
	        TargetingTool.superclass.constructor.call(this);
	        this.targetRequest = null;
	        this.targetEditPart = null;
	    };

	    util.defineClass(TargetingTool, AbstractTool, {
	        createTargetRequest: function() {
	            var request = new Request();
	            request.setType(this.getCommandName());
	            return request;
	        },
	        deactivate: function() {
	            if (this.isHoverActive()) {
	                this.resetHover();
	            }
	            this.eraseTargetFeedback();
	            this.targetEditPart = null;
	            this.targetRequest = null;
	            TargetingTool.superclass.deactivate.call(this);
	        },
	        eraseTargetFeedback: function() {
	            if (!this.isShowingTargetFeedback()) {
	                return;
	            }
	            this.setFlag(TargetingTool.FLAG_TARGET_FEEDBACK, false);
	            if (this.getTargetEditPart() != null){
	              this.getTargetEditPart().eraseTargetFeedback(this.getTargetRequest());
	            }
	        },
	        getCommand: function() {
	            if (this.getTargetEditPart() == null) {
	                return null;
	            }
	            return this.getTargetEditPart().getCommand(this.getTargetRequest());
	        },
	        getExclusionSet: function() {
	            return [];
	        },
	        getTargetingConditional: function() {
	            var that = this;
	            return {
	                evaluate: function(editpart) {
	                    return editpart.getTargetEditPart(that.getTargetRequest()) != null;
	                }
	            };
	        },
	        getTargetEditPart: function() {
	            return this.targetEditPart;
	        },
	        getTargetRequest: function() {
	            if (this.targetRequest == null) {
	                this.setTargetRequest(this.createTargetRequest());
	            }
	            return this.targetRequest;
	        },
	        handleEnteredEditPart: function() {
	            this.updateTargetRequest();
	            this.showTargetFeedback();
	            return true;
	        },
	        handleExitingEditPart: function() {
	            this.resetHover();
	            this.eraseTargetFeedback();
	            return true;
	        },
	        handleHoverStop: function() {
	            return false;
	        },
	        handleInvalidInput: function() {
	            this.eraseTargetFeedback();
	            this.setCurrentCommand(Command.UNEXECUTABLE_COMMAND);
	            return true;
	        },
	        handleLeavingEditPart: Function.emptyFunction,

	        handleViewerExited: function() {
	            this.setTargetEditPart(null);
	            return true;
	        },

	        isShowingTargetFeedback: function() {
	            return this.getFlag(TargetingTool.FLAG_TARGET_FEEDBACK);
	        },

	        isTargetLocked: function() {
	            return this.getFlag(TargetingTool.FLAG_LOCK_TARGET);
	        },

	        lockTargetEditPart: function(editpart) {
	            if (editpart == null) {
	                this.unlockTargetEditPart();
	                return;
	            }
	            this.setFlag(TargetingTool.FLAG_LOCK_TARGET, true);
	            this.setTargetEditPart(editpart);
	        },
	        resetFlags: function() {
	            this.setFlag(TargetingTool.FLAG_LOCK_TARGET, false);
	            TargetingTool.superclass.resetFlags.call(this);
	        },
	        resetHover: function() {
	            if (this.isHoverActive()) {
	                this.handleHoverStop();
	            }
	            this.setHoverActive(false);
	        },
	        setTargetEditPart: function(editpart) {
	            if (editpart != this.targetEditPart) {
	                if (this.targetEditPart != null) {
	                    this.handleExitingEditPart();
	                }
	                this.targetEditPart = editpart;
	                if (this.getTargetRequest() != null && this.getTargetRequest().setTargetEditPart != null) {
	                    this.getTargetRequest().setTargetEditPart(this.targetEditPart);
	                }
	                this.handleEnteredEditPart();
	            }
	        },
	        setTargetRequest: function(req) {
	            this.targetRequest = req;
	        },
	        showTargetFeedback: function() {
	            if (this.getTargetEditPart() != null) {
	                this.getTargetEditPart().showTargetFeedback(this.getTargetRequest());
	            }
	            this.setFlag(TargetingTool.FLAG_TARGET_FEEDBACK, true);
	        },
	        unlockTargetEditPart: function() {
	            this.setFlag(TargetingTool.FLAG_LOCK_TARGET, false);
	            this.updateTargetUnderMouse();
	        },

	        updateTargetRequest: Function.emptyFunction,

	        updateTargetUnderMouse: function() {
	            if (!this.isTargetLocked()) {
	                var editPart = this.getCurrentViewer().findObjectAtExcluding(this.getLocation(), this.getExclusionSet(), this.getTargetingConditional());
	                if (editPart != null) {
	                    editPart = editPart.getTargetEditPart(this.getTargetRequest());
	                }
	                var changed = this.getTargetEditPart() != editPart;
	                this.setTargetEditPart(editPart);
	                return changed;
	            } else {
	                return false;
	            }
	        }
	    });

	    TargetingTool.FLAG_LOCK_TARGET = AbstractTool.MAX_FLAG << 1;
	    TargetingTool.FLAG_TARGET_FEEDBACK = AbstractTool.MAX_FLAG << 2;
	    TargetingTool.MAX_FLAG = TargetingTool.FLAG_TARGET_FEEDBACK;

	    return TargetingTool;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));


/***/ },
/* 147 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-23
	 * @abstract
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(127),
	    __webpack_require__(131),
	    __webpack_require__(130),
	    __webpack_require__(135),
	    __webpack_require__(148),
	    __webpack_require__(126),
	    __webpack_require__(9),
	    __webpack_require__(143)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, KeyStroke, LayerManager, LayerConstants, Command, Input4Tool, Mouse, Point, Tool) {
	    'use strict';

	    var AbstractTool = function() {

	        AbstractTool.superclass.constructor.call(this);
	        this.flags = 0;
	        this.accessibleBegin = null;
	        this.accessibleStep = null;
	        this.command = null;
	        var that = this;
	        this.commandStackListener = {
	            stackChanged: function(event) {
	                if (event.isPreChangeEvent()) {
	                    that.handleCommandStackChanged();
	                }
	            }
	        };
	        this.current = null;
	        this.currentViewer = null;
	        this.defaultCursor = null;
	        this.disabledCursor = null;
	        this.domain = null;
	        this.operationSet = null;
	        this.startX = null;
	        this.startY = null;
	        this.state = null;
	        this.property = {};

	        this.setFlag(AbstractTool.FLAG_UNLOAD, true); //AbstractTool.FLAG_UNLOAD
	    };

	    util.defineClass(AbstractTool, Tool, {
	        //判断是否接收该键盘事件
	        acceptAbort: function(e) {
	            return e.charCode == KeyStroke.ESC;
	        },
	        acceptArrowKey: function(e) {
	            var key = e.keyCode;
	            //AbstractTool.STATE_INITIAL  AbstractTool.STATE_ACCESSIBLE_DRAG AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS
	            if (!(this.isInState(AbstractTool.STATE_INITIAL | AbstractTool.STATE_ACCESSIBLE_DRAG | AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS))) {
	                return false;
	            }
	            // KeyStroke.ARROW_UP KeyStroke.ARROW_RIGHT KeyStroke.ARROW_DOWN KeyStroke.ARROW_LEFT
	            return (key == KeyStroke.ARROW_UP) || (key == KeyStroke.ARROW_RIGHT) || (key == KeyStroke.ARROW_DOWN) || (key == KeyStroke.ARROW_LEFT);
	        },
	        acceptDragCommit: function(e) {
	            //AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS
	            return this.isInState(AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS) && e.character == 13;
	        },
	        accGetStep: function() {
	            return this.accessibleStep;
	        },
	        accStepIncrement: function() {
	            if (this.accessibleBegin == -1) {
	                this.accessibleBegin = new Date().getTime();
	                this.accessibleStep = 1;
	            } else {
	                this.accessibleStep = 4;
	                var elapsed = new Date().getTime() - this.accessibleBegin;
	                if (elapsed > 1000) {
	                    this.accessibleStep = Math.min(16, (elapsed / 150) << 0);
	                }
	            }

	        },
	        accStepReset: function() {
	            this.accessibleBegin = -1;
	        },
	        activate: function() {
	            this.resetFlags();
	            this.accessibleBegin = -1;
	            this.getCurrentInput().verifyMouseButtons = true;
	            this.setState(AbstractTool.STATE_INITIAL); //AbstractTool.STATE_INITIAL
	            this.setFlag(AbstractTool.FLAG_ACTIVE, true); //AbstractTool.FLAG_ACTIVE
	            this.getDomain().getCommandStack().addCommandStackEventListener(this.commandStackListener);
	        },
	        addFeedback: function(figure) {
	            var lm = this.getCurrentViewer().getEditPartRegistry().get(LayerManager.ID); //LayerManager.ID
	            if (lm == null) {
	                return;
	            }
	            lm.getLayer(LayerConstants.FEEDBACK_LAYER).add(figure); //LayerConstants.FEEDBACK_LAYER
	        },
	        applyProperty: function(key, value) {
	            if (AbstractTool.PROPERTY_UNLOAD_WHEN_FINISHED === key) {
	                if (typeof value === "boolean") {
	                    this.setUnloadWhenFinished(value);
	                }
	                return;
	            }
	            if (typeof key !== "string") {
	                return;
	            }
	            this.property[key] = value;
	        },
	        calculateCursor: function() {
	            if (this.isInState(AbstractTool.STATE_TERMINAL)) { //AbstractTool.STATE_TERMINAL
	                return null;
	            }
	            var command = this.getCurrentCommand();
	            if (command == null || !command.canExecute()) {
	                return this.getDisabledCursor();
	            }
	            return this.getDefaultCursor();
	        },
	        commitDrag: Function.emptyFunction,

	        createOperationSet: function() {
	            return this.getCurrentViewer().getSelectedEditParts();
	        },
	        deactivate: function() {
	            this.setFlag(AbstractTool.FLAG_ACTIVE, false); //AbstractTool.FLAG_ACTIVE
	            this.setViewer(null);
	            this.setCurrentCommand(null);
	            this.setState(AbstractTool.STATE_TERMINAL); //AbstractTool.STATE_TERMINAL
	            this.operationSet = null;
	            this.current = null;
	            this.getDomain().getCommandStack().removeCommandStackEventListener(this.commandStackListener);
	        },
	        executeCommand: function(command) {
	            this.getDomain().getCommandStack().removeCommandStackEventListener(this.commandStackListener);
	            try {
	                this.getDomain().getCommandStack().execute(command);
	            } finally {
	                this.getDomain().getCommandStack().addCommandStackEventListener(this.commandStackListener);
	            }
	        },
	        executeCurrentCommand: function() {
	            var curCommand = this.getCurrentCommand();
	            if (curCommand != null && curCommand.canExecute()) {
	                this.executeCommand(curCommand);
	            }
	            this.setCurrentCommand(null);
	        },
	        focusGained: function(event, viewer) {
	            this.setViewer(viewer);
	            this.handleFocusGained();
	        },
	        focusLost: function(event, viewer) {
	            this.setViewer(viewer);
	            this.handleFocusLost();
	        },
	        getCommand: function() {
	            return Command.UNEXECUTABLE_COMMAND;
	        },
	        getCommandName: Function.needOverride,
	        getCurrentCommand: function() {
	            return this.command;
	        },
	        getCurrentInput: function() {
	            if (this.current == null) {
	                this.current = new Input4Tool();
	            }
	            return this.current;
	        },
	        getCurrentViewer: function() {
	            return this.currentViewer;
	        },
	        getDefaultCursor: function() {
	            return this.defaultCursor;
	        },
	        getDisabledCursor: function() {
	            if (this.disabledCursor != null) {
	                return this.disabledCursor;
	            }
	            return this.getDefaultCursor();
	        },
	        getDomain: function() {
	            return this.domain;
	        },
	        getDragMoveDelta: function() {
	            return this.getLocation().getDifference(this.getStartLocation());
	        },
	        getLocation: function() {
	            return new Point(this.getCurrentInput().getMouseLocation()); //Point
	        },
	        getOperationSet: function() {
	            if (this.operationSet == null) {
	                this.operationSet = this.createOperationSet();
	            }
	            return this.operationSet;
	        },
	        getStartLocation: function() {
	            return new Point(this.startX, this.startY); //Point
	        },
	        getState: function() {
	            return this.state;
	        },
	        handleButtonDown: function(button) {
	            return false;
	        },
	        handleButtonUp: function(button) {
	            return false;
	        },
	        handleCommandStackChanged: function() {
	            //AbstractTool.STATE_INITIAL  AbstractTool.STATE_INVALID
	            if (!this.isInState(AbstractTool.STATE_INITIAL | AbstractTool.STATE_INVALID)) {
	                //AbstractTool.STATE_INVALID
	                this.setState(AbstractTool.STATE_INVALID);
	                this.handleInvalidInput();
	                return true;
	            }
	            return false;
	        },
	        handleDoubleClick: function(button) {
	            return false;
	        },
	        handleClick: function(button) {
	            return false;
	        },
	        handleDrag: function() {
	            return false;
	        },
	        handleDragInProgress: function() {
	            return false;
	        },
	        handleDragStarted: function() {
	            return false;
	        },
	        handleFinished: function() {
	            if (this.unloadWhenFinished()) {
	                this.getDomain().loadDefaultTool();
	            } else {
	                this.reactivate();
	            }
	        },
	        handleFocusGained: function() {
	            return false;
	        },
	        handleFocusLost: function() {
	            return false;
	        },
	        handleHover: function() {
	            return false;
	        },
	        handleInvalidInput: function() {
	            return false;
	        },
	        handleKeyDown: function(e) {
	            if (this.acceptAbort(e)) {
	                this.getDomain().loadDefaultTool();
	                return true;
	            }
	            return false;
	        },
	        handleKeyPressed: function() {
	            return false;
	        },
	        handleKeyTraversed: Function.emptyFunction,

	        handleKeyUp: function(e) {
	            return false;
	        },

	        handleMove: function() {
	            return false;
	        },

	        handleNativeDragFinished: function(event) {
	            return false;
	        },

	        handleNativeDragStarted: function(event) {
	            return false;
	        },
	        handleViewerEntered: function() {
	            return false;
	        },
	        handleViewerExited: function() {
	            return false;
	        },
	        isActive: function() {
	            return this.getFlag(AbstractTool.FLAG_ACTIVE); //AbstractTool.FLAG_ACTIVE
	        },
	        isCurrentViewerMirrored: function() {
	            return false;
	        },
	        isHoverActive: function() {
	            return this.getFlag(AbstractTool.FLAG_HOVER); //OM.gef.AbstractTool.FLAG_HOVER
	        },
	        isInDragInProgress: function() {
	            //AbstractTool.STATE_DRAG_IN_PROGRESS      AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS
	            return this.isInState(AbstractTool.STATE_DRAG_IN_PROGRESS | AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS);
	        },
	        isInputSynched: function(event) {
	            var input = this.getCurrentInput();
	            var mask = Mouse.getStatemark(event); //Mouse
	            return input.isMouseButtonDown(1) == ((mask & Mouse.BUTTON1) != 0) &&
	                input.isMouseButtonDown(2) == ((mask & Mouse.BUTTON2) != 0) &&
	                input.isMouseButtonDown(3) == ((mask & Mouse.BUTTON3) != 0) &&
	                input.isMouseButtonDown(4) == ((mask & Mouse.BUTTON4) != 0) &&
	                input.isMouseButtonDown(5) == ((mask & Mouse.BUTTON5) != 0);
	        },
	        isInState: function(state) {
	            return ((this.getState() & state) != 0);
	        },
	        isViewerImportant: function(viewer) {
	            return true;
	        },
	        keyDown: function(evt, viewer) {
	            if (!this.isViewerImportant(viewer)) {
	                return;
	            }
	            this.setViewer(viewer);
	            this.getCurrentInput().setInputByKeyboard(evt);
	            this.handleKeyDown(evt);
	        },
	        keyPressed: function(evt, viewer) {
	            if (!this.isViewerImportant(viewer)) {
	                return;
	            }
	            this.setViewer(viewer);
	            this.getCurrentInput().setInputByKeyboard(evt);
	            this.handleKeyPressed(evt);
	        },
	        keyTraversed: function(evt, viewer) {
	            if (!this.isViewerImportant(viewer)) {
	                return;
	            }
	            this.setViewer(viewer);
	            this.getCurrentInput().setInputByKeyboard(evt);
	            this.handleKeyTraversed(evt);
	        },
	        keyUp: function(evt, viewer) {
	            if (!this.isViewerImportant(viewer)) {
	                return;
	            }
	            this.setViewer(viewer);
	            this.getCurrentInput().setInputByKeyboard(evt);
	            this.handleKeyUp(evt);
	        },
	        mouseClick: function(me, viewer) {
	            if (me.button > 5 || !this.isViewerImportant(viewer)) {
	                return;
	            }
	            this.setViewer(viewer);
	            this.getCurrentInput().setInputByMouse(me, false);
	            this.handleClick(Mouse.getMouseNumber(me));
	        },
	        mouseDoubleClick: function(me, viewer) {
	            if (me.button > 5 || !this.isViewerImportant(viewer)) {
	                return;
	            }
	            this.setViewer(viewer);
	            this.getCurrentInput().setInputByMouse(me, true);
	            this.handleDoubleClick(Mouse.getMouseNumber(me));
	        },
	        mouseDown: function(me, viewer) {
	            if (!this.isViewerImportant(viewer)) {
	                return;
	            }
	            this.setViewer(viewer);
	            this.getCurrentInput().setInputByMouse(me);
	            this.getCurrentInput().setMouseButton(Mouse.getMouseNumber(me), true); //Mouse

	            this.startX = me.localX;
	            this.startY = me.localY;

	            this.handleButtonDown(Mouse.getMouseNumber(me)); //Mouse
	        },

	        mouseDrag: function(me, viewer) {
	            if (!this.isViewerImportant(viewer)) {
	                return;
	            }
	            this.setViewer(viewer);
	            var wasDragging = this.movedPastThreshold();
	            this.getCurrentInput().setInputByMouse(me);
	            this.handleDrag();
	            if (this.movedPastThreshold()) {
	                if (!wasDragging) {
	                    this.handleDragStarted();
	                }
	                this.handleDragInProgress();
	            }
	        },

	        mouseHover: function(me, viewer) {
	            if (!this.isViewerImportant(viewer)) {
	                return;
	            }
	            this.setViewer(viewer);
	            this.getCurrentInput().setInputByMouse(me);
	            this.handleHover();
	        },
	        mouseMove: function(me, viewer) {
	            if (!this.isViewerImportant(viewer)) {
	                return;
	            }
	            this.setViewer(viewer);
	            if (!this.isInputSynched(me)) {
	                var b1 = this.getCurrentInput().isMouseButtonDown(1);
	                var b2 = this.getCurrentInput().isMouseButtonDown(2);
	                var b3 = this.getCurrentInput().isMouseButtonDown(3);
	                var b4 = this.getCurrentInput().isMouseButtonDown(4);
	                var b5 = this.getCurrentInput().isMouseButtonDown(5);
	                this.getCurrentInput().verifyMouseButtons = true;
	                this.getCurrentInput().setInputByMouse(me);
	                if (b1) this.handleButtonUp(1);
	                if (b2) this.handleButtonUp(2);
	                if (b3) this.handleButtonUp(3);
	                if (b4) this.handleButtonUp(4);
	                if (b5) this.handleButtonUp(5);
	                if (this.getDomain().getActiveTool() != this) {
	                    return;
	                }
	                this.setViewer(viewer);
	            } else {
	                this.getCurrentInput().setInputByMouse(me);
	            }
	            if (this.isInState(AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS)) { //AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS
	                this.handleDragInProgress();
	            } else {
	                this.handleMove();
	            }
	        },
	        mouseUp: function(me, viewer) {
	            if (!this.isViewerImportant(viewer)) {
	                return;
	            }
	            this.setViewer(viewer);
	            this.getCurrentInput().setInputByMouse(me);
	            this.getCurrentInput().setMouseButton(Mouse.getMouseNumber(me), false);
	            this.handleButtonUp(Mouse.getMouseNumber(me));
	        },
	        touchStart: function(me, viewer) {
	            if (!this.isViewerImportant(viewer)) {
	                return;
	            }
	            this.setViewer(viewer);
	            this.getCurrentInput().setInputByMouse(me);
	            this.getCurrentInput().setMouseButton(Mouse.getMouseNumber(me), true);

	            this.startX = me.localX;
	            this.startY = me.localY;
	            if (this.handleTouchStart) {
	                this.handleTouchStart();
	            }
	        },

	        touchMove: function(me, viewer) {
	            if (!this.isViewerImportant(viewer)) {
	                return;
	            }
	            this.setViewer(viewer);
	            this.getCurrentInput().setInputByMouse(me);
	            if (this.handleTouchMove) {
	                this.handleTouchMove();
	            }
	        },
	        touchEnd: function(me, viewer) {
	            if (!this.isViewerImportant(viewer)) {
	                return;
	            }
	            this.setViewer(viewer);
	            this.getCurrentInput().setInputByMouse(me);
	            this.getCurrentInput().setMouseButton(Mouse.getMouseNumber(me), false);
	            if (this.handleTouchEnd) {
	                this.handleTouchEnd();
	            }
	        },
	        mouseWheelScrolled: function(event, viewer) {
	            if (this.isInState(AbstractTool.STATE_INITIAL)) { //AbstractTool.STATE_INITIAL
	                this.performViewerMouseWheel(event, viewer);
	            }
	        },
	        movedPastThreshold: function() {
	            if (this.getFlag(AbstractTool.FLAG_PAST_THRESHOLD)) { //AbstractTool.FLAG_PAST_THRESHOLD
	                return true;
	            }
	            var start = this.getStartLocation(),
	                end = this.getLocation();
	            //AbstractTool.DRAG_THRESHOLD
	            if (Math.abs(start.x - end.x) > AbstractTool.DRAG_THRESHOLD || Math.abs(start.y - end.y) > AbstractTool.DRAG_THRESHOLD) {
	                //AbstractTool.FLAG_PAST_THRESHOLD
	                this.setFlag(AbstractTool.FLAG_PAST_THRESHOLD, true);
	                return true;
	            }
	            return false;
	        },
	        nativeDragFinished: function(event, viewer) {
	            if (!this.isViewerImportant(viewer)) {
	                return;
	            }
	            this.setViewer(viewer);
	            this.handleNativeDragFinished(event);
	        },
	        nativeDragStarted: function(event, viewer) {
	            if (!this.isViewerImportant(viewer)) {
	                return;
	            }
	            this.setViewer(viewer);
	            this.handleNativeDragStarted(event);
	        },
	        performViewerMouseWheel: function(event, viewer) {
	            //TODO
	        },
	        placeMouseInViewer: function(p) {
	            // if (this.getCurrentViewer() == null) {
	            // return;
	            // }
	            // var c = this.getCurrentViewer().getControl();
	            // var rect;
	            // if (c instanceof Scrollable) {
	            // rect = c..getClientArea();
	            // }
	            //TODO
	        },
	        reactivate: function() {
	            var viewer = this.getCurrentViewer();
	            this.deactivate();
	            this.activate();
	            if (viewer != null) {
	                var c = viewer.getControl();
	                if (c != null && !c.isDisposed() /* && c.isFocusControl()*/ ) {
	                    this.setViewer(viewer);
	                }
	            }
	        },
	        refreshCursor: function() {
	            if (this.isActive()) {
	                this.setCursor(this.calculateCursor());
	            }
	        },
	        releaseToolCapture: function() {
	            this.getCurrentViewer().setRouteEventsToEditDomain(false);
	        },
	        removeFeedback: function(figure) {
	            var lm = this.getCurrentViewer().getEditPartRegistry().get(LayerManager.ID); //LayerManager.ID
	            if (lm == null) {
	                return;
	            }
	            //LayerConstants.FEEDBACK_LAYER
	            lm.getLayer(LayerConstants.FEEDBACK_LAYER).remove(figure);
	        },
	        resetFlags: function() {
	            this.setFlag(AbstractTool.FLAG_PAST_THRESHOLD, false);
	            this.setFlag(AbstractTool.FLAG_HOVER, false);
	        },
	        setCurrentCommand: function(c) {
	            this.command = c;
	            this.refreshCursor();
	        },
	        setCursor: function(cursor) {
	            if (this.getCurrentViewer() != null) {
	                this.getCurrentViewer().setCursor(cursor);
	            }
	        },
	        setDefaultCursor: function(cursor) {
	            if (this.defaultCursor == cursor) {
	                return;
	            }
	            this.defaultCursor = cursor;
	            this.refreshCursor();
	        },
	        setDisabledCursor: function(cursor) {
	            if (this.disabledCursor == cursor) {
	                return;
	            }
	            this.disabledCursor = cursor;
	            this.refreshCursor();
	        },
	        setEditDomain: function(domain) {
	            this.domain = domain;
	        },
	        setHoverActive: function(value) {
	            //AbstractTool.FLAG_HOVER
	            this.setFlag(AbstractTool.FLAG_HOVER, value);
	        },
	        setMouseCapture: function(value) {
	            if (this.getCurrentViewer() != null && this.getCurrentViewer().getControl() != null && !this.getCurrentViewer().getControl().isDisposed()) {
	                this.getCurrentViewer().getControl().setCapture(value);
	            }
	        },
	        setProperties: function(properties) {
	            if (properties == null) {
	                return;
	            }
	            for (var i in properties) {
	                this.applyProperty(i, properties[i]);
	            }
	        },
	        setStartLocation: function(p) {
	            this.startX = p.x;
	            this.startY = p.y;
	        },
	        setState: function(state) {
	            // this.debug_printState(state);
	            this.state = state;
	        },
	        setToolCapture: function() {
	            this.getCurrentViewer().setRouteEventsToEditDomain(true);
	        },
	        setUnloadWhenFinished: function(value) {
	            //AbstractTool.FLAG_UNLOAD
	            this.setFlag(AbstractTool.FLAG_UNLOAD, value);
	        },
	        setViewer: function(viewer) {
	            if (viewer == this.currentViewer) {
	                return;
	            }
	            this.setCursor(null);
	            this.currentViewer = viewer;
	            if (this.currentViewer != null) {
	                //改变viewer之后，设置当前input的位置，本因通过鼠标捕获当前位置。此处直接使用开始位置。
	                this.getCurrentInput().setMouseLocation(this.startX, this.startY);
	            }
	            this.refreshCursor();
	        },
	        stateTransition: function(start, end) {
	            if ((this.getState() & start) != 0) {
	                this.setState(end);
	                return true;
	            } else {
	                return false;
	            }
	        },
	        unloadWhenFinished: function() {
	            //AbstractTool.FLAG_UNLOAD
	            return this.getFlag(AbstractTool.FLAG_UNLOAD);
	        },
	        viewerEntered: function(me, viewer) {
	            if (!this.isViewerImportant(viewer)) {
	                return;
	            }
	            this.getCurrentInput().setInputByMouse(me);
	            if (this.getCurrentViewer() != null && this.getCurrentViewer() != viewer) {
	                this.handleViewerExited();
	            }
	            this.setViewer(viewer);
	            this.handleViewerEntered();
	        },
	        viewerExited: function(me, viewer) {
	            if (viewer === this.getCurrentViewer()) {
	                this.getCurrentInput().setInputByMouse(me);
	                this.handleViewerExited();
	                this.setViewer(null);
	            }
	        },
	        setFlag: function(flag, value) {
	            if (value) {
	                this.flags |= flag;
	            } else {
	                this.flags &= ~flag;
	            }
	        },
	        getFlag: function(flag) {
	            return (this.flags & flag) != 0;
	        },
	        debug_printState: function(state) {
	            var name;
	            switch (state) {
	                case 1:
	                    name = 'STATE_INITIAL';
	                    break;
	                case 2:
	                    name = 'STATE_DRAG';
	                    break;
	                case 4:
	                    name = 'STATE_DRAG_IN_PROGRESS';
	                    break;
	                case 8:
	                    name = 'STATE_INVALID';
	                    break;
	                case 16:
	                    name = 'STATE_ACCESSIBLE_DRAG';
	                    break;
	                case 32:
	                    name = 'STATE_ACCESSIBLE_DRAG_IN_PROGRESS';
	                    break;
	                case 1 << 30:
	                    name = 'STATE_TERMINAL';
	                    break;
	            }
	        }

	    });

	    AbstractTool.PROPERTY_UNLOAD_WHEN_FINISHED = "unloadWhenFinished";
	    AbstractTool.DRAG_THRESHOLD = 5;
	    AbstractTool.FLAG_ACTIVE = 8;
	    AbstractTool.FLAG_PAST_THRESHOLD = 1;
	    AbstractTool.FLAG_UNLOAD = 4;
	    AbstractTool.MAX_FLAG = 8;
	    AbstractTool.MAX_STATE = 32;
	    AbstractTool.MOUSE_BUTTON1 = 524288;
	    AbstractTool.MOUSE_BUTTON2 = 1048576;
	    AbstractTool.MOUSE_BUTTON3 = 2097152;
	    AbstractTool.MOUSE_BUTTON_ANY = 1;
	    AbstractTool.STATE_ACCESSIBLE_DRAG = 16;
	    AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS = 32;
	    AbstractTool.STATE_DRAG = 2;
	    AbstractTool.STATE_DRAG_IN_PROGRESS = 4;
	    AbstractTool.STATE_INITIAL = 1;
	    AbstractTool.STATE_INVALID = 8;
	    AbstractTool.STATE_TERMINAL = 1 << 30;
	    AbstractTool.MODIFIER_NO_SNAPPING = 1;

	    return AbstractTool;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 148 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(9),
	    __webpack_require__(127),
	    __webpack_require__(126),
	    __webpack_require__(149)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Point, KeyStroke, Mouse, FlagSupport) {
	    'use strict';

	    if (Input4Tool) {
	        return;
	    }
	    var Input4Tool = function() {
	        Input4Tool.superclass.constructor.call(this);
	        this.modifiers = null;
	        this.mouse = new Point();
	        this.verifyMouseButtons = null;
	    };

	    util.defineClass(Input4Tool, FlagSupport, {
	        getModifiers: function() {
	            return this.modifiers;
	        },
	        getMouseLocation: function() {
	            return this.mouse;
	        },
	        isAltKeyDown: function() {
	            return (this.modifiers & KeyStroke.ALT) != 0;
	        },
	        isAnyButtonDown: function() {
	            return this.getFlag(2 | 4 | 8 | 16 | 32);
	        },
	        isControlKeyDown: function() {
	            return (this.modifiers & KeyStroke.CTRL) != 0;
	        },
	        isModKeyDown: function(mod) {
	            return (this.modifiers & mod) != 0;
	        },
	        isMouseButtonDown: function(which) {
	            return this.getFlag(1 << which);
	        },
	        isShiftKeyDown: function() {
	            return (this.modifiers & KeyStroke.SHIFT) != 0;
	        },
	        setInputByKeyboard: function(ke) {
	            this.modifiers = KeyStroke.getStatemark(ke.altKey, ke.ctrlKey, ke.shiftKey);
	            //浏览器原始事件
	            this.e = ke.e;
	        },
	        setInputByMouse: function(me, doubleClick) {
	            this.setMouseLocation(me.localX, me.localY);
	            //浏览器原始事件
	            this.e = me.e;
	            this.modifiers = Mouse.getStatemark(me) | KeyStroke.getStatemark(me.altKey, me.ctrlKey, me.shiftKey);
	            if (this.verifyMouseButtons) {
	                this.setMouseButton(1, (this.modifiers & Mouse.BUTTON1) != 0);
	                this.setMouseButton(2, (this.modifiers & Mouse.BUTTON2) != 0);
	                this.setMouseButton(3, (this.modifiers & Mouse.BUTTON3) != 0);
	                this.setMouseButton(4, (this.modifiers & Mouse.BUTTON4) != 0);
	                this.setMouseButton(5, (this.modifiers & Mouse.BUTTON5) != 0);
	                this.verifyMouseButtons = false;
	            }
	        },
	        getBrowserEvent: function() {
	            return this.e;
	        },
	        setMouseButton: function(which, state) {
	            this.setFlag(1 << which, state);
	        },
	        setMouseLocation: function(x, y) {
	            this.mouse.x = x;
	            this.mouse.y = y;
	        }
	    });

	    return Input4Tool;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 149 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    var FlagSupport = function() {
	        this.flags = 0;
	    };
	    util.defineClass(FlagSupport, Object, {
	        getFlag: function(flag) {
	            return (this.flags & flag) != 0;
	        },
	        setFlag: function(flag, value) {
	            if (value) {
	                this.flags |= flag;
	            } else {
	                this.flags &= ~flag;
	            }
	        }

	    });

	    return FlagSupport;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 150 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-5-9
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(141)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Request) {
	    'use strict';

	    var LocationRequest = function(type) {
	        LocationRequest.superclass.constructor.call(this, type);
	        this.location = null;
	    };

	    util.defineClass(LocationRequest, Request, {
	        getLocation: function() {
	            return this.location;
	        },
	        setLocation: function(p) {
	            this.location = p;
	        }
	    });

	    return LocationRequest;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 151 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-5-9
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(126),
	    __webpack_require__(127),
	    __webpack_require__(150)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Mouse, KeyStroke, LocationRequest) {
	    'use strict';

	    var SelectionRequest = function(type) {
	        LocationRequest.superclass.constructor.call(this, type);
	        this.statemask = null;
	        this.lastButtonPressed = null;
	    };

	    util.defineClass(SelectionRequest, LocationRequest, {
	        getLastButtonPressed: function() {
	            return this.lastButtonPressed;
	        },
	        getModifiers: function() {
	            return this.statemask;
	        },
	        isAltKeyPressed: function() {
	            return ((this.statemask & KeyStroke.ALT) != 0);
	        },
	        isAnyMouseButtonPressed: function() {
	            return ((this.statemask & Mouse.BUTTON_ANY) != 0);
	        },
	        isControlKeyPressed: function() {
	            return ((this.statemask & KeyStroke.CTRL) != 0);
	        },
	        isLeftMouseButtonPressed: function() {
	            return ((this.statemask & Mouse.BUTTON1) != 0);
	        },
	        isRightMouseButtonPressed: function() {
	            return ((this.statemask & Mouse.BUTTON3) != 0);
	        },
	        isShiftKeyPressed: function() {
	            return ((this.statemask & KeyStroke.SHIFT) != 0);
	        },
	        setModifiers: function(mask) {
	            this.statemask = mask;
	        },
	        setLastButtonPressed: function(button) {
	            this.lastButtonPressed = button;
	        }
	    });

	    return SelectionRequest;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 152 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    var EditPartListener = function() {

	    };

	    EditPartListener.prototype.childAdded = Function.needOverride;
	    EditPartListener.prototype.partActivated = Function.needOverride;
	    EditPartListener.prototype.partDeactivated = Function.needOverride;
	    EditPartListener.prototype.removingChild = Function.needOverride;
	    EditPartListener.prototype.selectedStateChanged = Function.needOverride;

	    EditPartListener.Stub = function() {

	    };

	    util.defineClass(EditPartListener.Stub, EditPartListener, {
	        childAdded: Function.emptyFunction,
	        partActivated: Function.emptyFunction,
	        partDeactivated: Function.emptyFunction,
	        removingChild: Function.emptyFunction,
	        selectedStateChanged: Function.emptyFunction,
	    });

	    return EditPartListener;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 153 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-9
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(142),
	    __webpack_require__(129),
	    __webpack_require__(134),
	    __webpack_require__(4),
	    __webpack_require__(5)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, SelectionManager, EditPart, EditPartViewer, PropertyChangeSupport, Map) {
	    'use strict';

	    var AbstractEditPartViewer = function() {
	        AbstractEditPartViewer.superclass.constructor.call(this);
	        this.disposeListener = null;
	        this.selection = [];
	        this.selectionListeners = [];
	        this.factory = null;
	        this.mapIDToEditPart = new Map(); //Map
	        this.mapVisualToEditPart = new Map(); //Map
	        this.properties = {};
	        this.control = null;
	        this.resources = null;
	        this.domain = null;
	        this.rootEditPart = null;
	        this.contextMenu = null;

	        this.keyHandler = null;
	        this.changeSupport = null;

	        this.setSelectionManager(SelectionManager.createDefault());
	        this.init();

	        function createId() {
	            var id = "editPartViewer_" + AbstractEditPartViewer.count;
	            AbstractEditPartViewer.count++;

	            return id;
	        }
	        this.id = createId();
	        this.disposed = false;
	    };
	    AbstractEditPartViewer.count = 0;
	    util.defineClass(AbstractEditPartViewer, EditPartViewer, {
	        dispose: function() {
	            if (this.disposed) {
	                return;
	            }
	            this.disposed = true;
	            this.selectionModel = null;
	            this.selection = null;
	            this.mapIDToEditPart = null;
	            this.mapVisualToEditPart = null;
	            this.properties = null;
	            this.contextMenu = null;
	            this.keyHandler = null;
	            this.changeSupport = null;
	            if (this.rootEditPart && this.rootEditPart.dispose) {
	                this.rootEditPart.dispose();
	            }
	            this.rootEditPart = null;
	            return true;
	        },
	        getId: function() {
	            return this.id;
	        },
	        setSelectionManager: function(model) {
	            if (model == null) {
	                throw { 'type': '空值', 'message': 'setSelectionManager的参数为空.' };
	            }
	            if (this.selectionModel != null) {
	                this.selectionModel.internalUninstall();
	            }
	            this.selectionModel = model;
	            model.internalInitialize(this, this.selection, function() {
	                this.fireSelectionChanged();
	            }.bind(this));
	            if (this.getControl() != null) {
	                model.internalHookControl(this.getControl());
	            }
	        },

	        addPropertyChangeListener: function(listener) {
	            if (this.changeSupport == null) {
	                this.changeSupport = new PropertyChangeSupport(this); //PropertyChangeSupport
	            }
	        },

	        addSelectionChangedListener: function(listener) {
	            this.selectionListeners.push(listener);
	        },

	        appendSelection: function(editpart) {
	            this.selectionModel.appendSelection(editpart);
	        },

	        createControl: Function.needOverride,

	        deselect: function(editpart) {
	            this.selectionModel.deselect(editpart);
	        },

	        deselectAll: function() {
	            this.selectionModel.deselectAll();
	        },

	        handleDispose: function() {
	            if (this.resources != null) {
	                this.resources.dispose();
	            }
	            this.setControl(null);
	        },

	        findObjectAt: function(pt) {
	            return this.findObjectAtExcluding(pt, []);
	        },

	        findObjectAtExcluding: function(pt, exclude) {
	            return this.findObjectAtExcluding(pt, exclude, null);
	        },

	        fireSelectionChanged: function() {
	            this.selectionListeners.forEach(function(l) {
	                if ('function' === typeof l) {
	                    l(this, this.getSelection());
	                } else {
	                    if (l.selectionChanged) {
	                        l.selectionChanged(this, this.getSelection());
	                    }
	                }

	            }.bind(this));
	        },

	        flush: Function.emptyFunction,

	        getContextMenu: function() {
	            return this.contextMenu;
	        },

	        getContents: function() {
	            return this.getRootEditPart().getContents();
	        },

	        getControl: function() {
	            return this.control;
	        },

	        getEditDomain: function() {
	            return this.domain;
	        },

	        getEditPartFactory: function() {
	            return this.factory;
	        },

	        getEditPartRegistry: function() {
	            return this.mapIDToEditPart;
	        },

	        getFocusEditPart: function() {
	            if (this.selectionModel.getFocus() != null) {
	                return this.selectionModel.getFocus();
	            }
	            if (this.getSelectedEditParts().length === 0) {
	                if (this.getContents() != null) {
	                    return this.getContents();
	                } else {
	                    return this.getRootEditPart();
	                }
	            }
	            var selection = this.getSelectedEditParts();
	            return selection[selection.length - 1];
	        },

	        getKeyHandler: function() {
	            return this.keyHandler;
	        },

	        getProperty: function(key) {
	            if (this.properties != null) {
	                return this.properties.get(key); //Map
	            }
	            return null;
	        },

	        getResourceManager: function() {
	            if (this.resources != null) {
	                return this.resources;
	            }
	            if (this.getControl() == null) {
	                Debugger.error('control is null.');
	            }
	            //this.resources = new LocalResourceManager(JFaceResources.getResources());
	            return this.resources;
	        },

	        getRootEditPart: function() {
	            return this.rootEditPart;
	        },

	        getSelectedEditParts: function() {
	            return this.selection;
	        },

	        getSelection: function() {
	            return this.selectionModel.getSelection();
	        },

	        getSelectionManager: function() {
	            return this.selectionModel;
	        },

	        getVisualPartMap: function() {
	            return this.mapVisualToEditPart;
	        },

	        hookControl: function() {
	            var control = this.getControl();
	            var that = this;
	            if (control == null) {
	                throw { 'type': '空值', 'message': 'control为空!' };
	            }
	            this.getSelectionManager().internalHookControl(control);
	            this.disposeListener = { widgetDisposed: function(e) { that.handleDispose(e); } };
	            control.addDisposeListener(this.disposeListener);
	            if (this.getRootEditPart() != null) {
	                this.getRootEditPart().activate();
	            }
	            if (this.contextMenu != null) {
	                control.setMenu(this.contextMenu.createContextMenu(this.getControl()));
	            }

	        },

	        init: Function.emptyFunction,

	        primDeselectAll: function() {
	            var part;
	            var list = this.primGetSelectedEditParts();
	            for (var i = 0; i < list.length; i++) {
	                part = list[i];
	                part.setSelected(EditPart.SELECTED_NONE); //EditPart.SELECTED_NONE
	            }
	            list.length = 0;
	        },

	        primGetSelectedEditParts: function() {
	            return this.selection;
	        },

	        removePropertyChangeListener: function(listener) {
	            if (this.changeSupport != null) {
	                this.changeSupport.removePropertyChangeListener(listener);
	                if (this.changeSupport.getPropertyChangeListeners().length === 0) {
	                    this.changeSupport = null;
	                }
	            }
	        },

	        removeSelectionChangedListener: function(l) {
	            this.selectionListeners.remove(l);
	        },

	        reveal: Function.emptyFunction,

	        select: function(editpart) {
	            if ((this.getSelectedEditParts().length == 1) && (this.getSelectedEditParts()[0] == editpart)) {
	                return;
	            }
	            this.primDeselectAll();
	            this.appendSelection(editpart);
	        },

	        setContextMenu: function(manager) {
	            if (this.contextMenu != null) {
	                this.contextMenu.dispose();
	            }
	            this.contextMenu = manager;
	            if (this.getControl() != null && !this.getControl().isDisposed()) {
	                this.getControl().setMenu(this.contextMenu.createContextMenu(this.getControl()));
	            }
	        },

	        // setContents: function(editpart) {
	        //     this.getRootEditPart().setContents(editpart);
	        // },

	        setContents: function(contents) {
	            if (contents instanceof EditPart) {
	                this.getRootEditPart().setContents(contents);
	            } else {
	                if (this.getEditPartFactory() == null) {
	                    throw { 'type': '空值', 'message': 'editPartFacotry为空' };
	                }
	                this.setContents(this.getEditPartFactory().createEditPart(null, contents));
	            }
	        },

	        setControl: function(control) {
	            if (this.control != null) {
	                this.unhookControl();
	            }
	            this.control = control;
	            if (control != null) {
	                this.hookControl();
	            }
	        },

	        setCursor: function(cursor) {
	            if (this.getControl() == null || this.getControl().isDisposed()) {
	                return;
	            }
	            this.getControl().setCursor(cursor);
	        },

	        setEditDomain: function(editdomain) {
	            this.domain = editdomain;
	        },

	        setEditPartFactory: function(factory) {
	            this.factory = factory;
	        },

	        setFocus: function(part) {
	            this.getSelectionManager().setFocus(part);
	        },

	        setKeyHandler: function(handler) {
	            this.keyHandler = handler;
	        },

	        setProperty: function(key, value) {
	            if (this.properties == null) {
	                this.properties = {}; //HashMap
	            }
	            var old;
	            if (value == null) {
	                old = this.properties[key];
	                delete this.properties[key];
	            } else {
	                old = this.properties[key];
	                this.properties[key] = value;
	            }

	            if (this.changeSupport != null) {
	                this.changeSupport.firePropertyChange(key, old, value);
	            }
	        },

	        setRootEditPart: function(editpart) {
	            if (this.rootEditPart != null) {
	                if (this.rootEditPart.isActive()) {
	                    this.rootEditPart.deactivate();
	                }
	                this.rootEditPart.setViewer(null);
	            }
	            this.rootEditPart = editpart;
	            this.rootEditPart.setViewer(this);
	            if (this.getControl() != null) {
	                this.rootEditPart.activate();
	            }

	        },

	        setRouteEventsToEditDomain: Function.emptyFunction,

	        setSelection: function(newSelection) {
	            this.selectionModel.setSelection(newSelection);
	        },

	        unhookControl: function() {
	            if (this.getControl() == null) {
	                throw { 'type': '空值', 'mesage': 'viewer的control为空' };
	            }
	            if (this.disposeListener != null) {
	                this.getControl().removeDisposeListener(this.disposeListener);
	                this.disposeListener = null;
	            }
	            if (this.getContextMenu() != null) {
	                this.getContextMenu().dispose();
	            }
	            if (this.getRootEditPart() != null) {
	                this.getRootEditPart().deactivate();
	            }

	        }


	    });

	    return AbstractEditPartViewer;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 154 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(153),
	    __webpack_require__(155),
	    __webpack_require__(131),
	    __webpack_require__(128),
	    __webpack_require__(139),
	    __webpack_require__(101),
	    __webpack_require__(107),
	    __webpack_require__(130),
	    __webpack_require__(10)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    AbstractEditPartViewer,
	    ScalableFreeformRootEditPart,
	    LayerManager,
	    ConditionalTreeSearch,
	    DomainEventDispatcher,
	    LightweightSystem,
	    Canvas,
	    LayerConstants,
	    Dimension
	) {
	    'use strict';

	    var GraphicalViewerImpl = function() {

	        GraphicalViewerImpl.superclass.constructor.call(this);

	        this.lws = this.createLightweightSystem();
	        this.createControl();
	        // this.lws = this.createLightweightSystem(this.getControl());
	        this.rootFigure = null;
	        this.eventDispatcher = null;
	        this.lFocus = null;

	        this.createDefaultRoot();
	        this.initScrollHelper();
	        //this.setProperty(MouseWheelHandler.KeyGenerator.getKey(SWT.NONE),MouseWheelDelegateHandler.SINGLETON);
	    };
	    util.defineClass(GraphicalViewerImpl, AbstractEditPartViewer, {
	        dispose: function() {
	            if (GraphicalViewerImpl.superclass.dispose.call(this)) {
	                if (this.scrollHelper && this.scrollHelper.dispose) {
	                    this.scrollHelper.dispose();
	                }
	                if (this.control && this.control.dispose) {
	                    this.control.dispose();
	                }
	                if (this.lws && this.lws.dispose) {
	                    this.lws.dispose();
	                }
	                if (this.rootFigure && this.rootFigure.dispose) {
	                    this.rootFigure.dispose();
	                }
	                if (this.eventDispatcher && this.eventDispatcher.dispose) {
	                    this.eventDispatcher.dispose();
	                }
	                delete this.element;
	                delete this.scrollHelper;
	                delete this.eventDispatcher;
	                delete this.control;
	                delete this.lws;
	                delete this.rootFigure;
	                delete this.lFocus;
	            }
	        },
	        getScrollHelper: function() {
	            return this.scrollHelper;
	        },
	        initScrollHelper: function() {
	            this.scrollBar = document.createElement("div");
	            this.scrollBar.style.position = 'absolute';
	            //this.scrollBar.style.border="1px solid black";
	            this.scrollBar.style.overflow = "auto";
	            this.scrollBar.style.height = 800 + "px";
	            this.scrollBar.style.width = 1600 + "px";
	            this.placeHolder = document.createElement("div");
	            this.scrollBar.appendChild(this.placeHolder);
	            this.scrollHelper = { scrollBar: this.scrollBar, placeHolder: this.placeHolder };
	        },
	        setSize: function(width, height) {
	            var ele = this.getElement();
	            ele.style.width = width + 'px';
	            ele.style.height = height + 'px';

	            this.getControl().resize(width, height);
	            this.width = width;
	            this.height = height;
	            this.setScrollBarSize(width, height);
	        },
	        setScrollBarSize: function(width, height) {
	            this.scrollBar.style.width = width + 'px';
	            this.scrollBar.style.height = height + 'px';
	        },
	        getSize: function() {
	            return new Dimension(this.width, this.height);
	        },
	        getElement: function() {
	            if (null == this.element) {
	                this.element = document.createElement("div");
	                this.element.className = "viewer";
	                this.element.style.position = 'absolute';
	            }
	            return this.element;
	        },
	        createControl: function() {
	            var canvasElement = document.createElement("canvas");
	            canvasElement.style.position = "absolute";
	            canvasElement.style.top = "0px";
	            canvasElement.style.left = "0px";
	            canvasElement.id = this.getId();
	            // canvasElement.style.border="1px solid";
	            this.getElement().appendChild(canvasElement);
	            var canvas = new Canvas(canvasElement); //Canvas
	            this.setControl(canvas);
	        },
	        // createControl: function (composite) {
	        // this.setControl(new Canvas(composite));  //Canvas
	        // return this.getControl();
	        // },

	        createDefaultRoot: function() {
	            // this.setRootEditPart(new COM.gef.ScalableRootEditPart());  //COM.gef.ScalableRootEditPart
	            this.setRootEditPart(new ScalableFreeformRootEditPart()); //COM.gef.SimpleRootEditPart
	        },

	        createLightweightSystem: function() {
	            var lws = new LightweightSystem(); //LightweightSystem
	            return lws;
	        },

	        handleDispose: function(e) {
	            //super.handleDispose(e);
	            //getLightweightSystem().getUpdateManager().dispose();
	        },

	        handleFocusGained: function(fe) {
	            if (this.getFocusEditPart() != null) {
	                this.getFocusEditPart().setFocus(true);
	            }
	        },

	        handleFocusLost: function(fe) {
	            if (this.getFocusEditPart() != null) {
	                this.getFocusEditPart().setFocus(false);
	            }
	        },

	        findHandleAt: function(p) {
	            var layermanager = this.getEditPartRegistry().get(LayerManager.ID); //COM.gef.LayerManager
	            if (layermanager == null) {
	                return null;
	            }
	            var list = [];
	            list.push(layermanager.getLayer(LayerConstants.PRIMARY_LAYER)); //LayerConstants
	            list.push(layermanager.getLayer(LayerConstants.CONNECTION_LAYER));
	            list.push(layermanager.getLayer(LayerConstants.FEEDBACK_LAYER));
	            var handle = this.getLightweightSystem().getRootFigure().findFigureAtExcluding(p.x, p.y, list);

	            //if (handle instanceof Handle) {  //Handle
	            if (handle == null) {
	                return null;
	            }
	            if (handle.getDragTracker) {
	                return handle;
	            }
	            return null;
	        },

	        findObjectAtExcluding: function(pt, exclude, condition) {
	            var figure = this.getLightweightSystem().getRootFigure().findFigureAt(pt.x, pt.y, new ConditionalTreeSearch(exclude, this, condition)); //ConditionalTreeSearch
	            var part = null;
	            while (part == null && figure != null) {
	                part = this.getVisualPartMap().get(figure);
	                figure = figure.getParent();
	            }
	            if (part == null) {
	                return this.getContents();
	            }
	            return part;
	        },

	        flush: function() {
	            this.getLightweightSystem().getUpdateManager().performUpdate();
	        },

	        getLayerManager: function() {
	            return this.getEditPartRegistry().get(LayerManager.ID); //COM.gef.LayerManager
	        },

	        getLightweightSystem: function() {
	            return this.lws;
	        },

	        hookControl: function() {
	            GraphicalViewerImpl.superclass.hookControl.call(this);
	            this.getLightweightSystem().setControl(this.getControl());
	        },

	        reveal: function(part) {
	            //TODO
	        },

	        setContextMenu: function(contextMenu) {
	            GraphicalViewerImpl.superclass.setContextMenu.call(this, contextMenu);
	        },
	        setCursor: function(newCursor) {
	            if (this.eventDispatcher != null) {
	                this.eventDispatcher.setOverrideCursor(newCursor);
	            }
	        },

	        setEditDomain: function(domain) {
	            GraphicalViewerImpl.superclass.setEditDomain.call(this, domain);
	            this.eventDispatcher = this.createEventDispatcher(domain, this);
	            this.getLightweightSystem().setEventDispatcher(this.eventDispatcher);
	            this.appendScrollBar(domain.getControl());
	        },
	        createEventDispatcher: function(domain, viewer) {
	            return new DomainEventDispatcher(domain, viewer); //COM.gef.DomainEventDispatcher
	        },
	        appendScrollBar: function(parent) {
	            parent.appendChild(this.scrollBar);
	        },

	        setRootEditPart: function(editpart) {
	            GraphicalViewerImpl.superclass.setRootEditPart.call(this, editpart);
	            this.setRootFigure(editpart.getFigure());
	        },

	        setRootFigure: function(figure) {
	            this.rootFigure = figure;
	            this.hookRootFigure();
	        },

	        hookRootFigure: function() {
	            this.getLightweightSystem().setContents(this.rootFigure);
	        },

	        setRouteEventsToEditDomain: function(value) {
	            this.eventDispatcher.setRouteEventsToEditor(value);
	        },

	        unhookControl: function() {
	            GraphicalViewerImpl.superclass.unhookControl.call(this);
	            if (this.lFocus != null) {
	                this.etControl().removeFocusListener(this.lFocus);
	                this.lFocus = null;
	            }
	        }

	    });

	    /*
	    private static class MouseWheelDelegateHandler implements MouseWheelHandler {
	    	private static final MouseWheelHandler SINGLETON = new MouseWheelDelegateHandler();
	    	private MouseWheelDelegateHandler() {
	    	}

	    		//
	    		// Delegates handling to the selected editpart's MouseWheelHelper.
	    		//
	    		// @see org.eclipse.gef.MouseWheelHandler#handleMouseWheel(org.eclipse.swt.widgets.Event,
	    		//      org.eclipse.gef.EditPartViewer)
	    		//
	    		 public void handleMouseWheel(Event event, EditPartViewer viewer) {
	    			var part = viewer.getFocusEditPart();
	    			do {
	    				MouseWheelHelper helper = (MouseWheelHelper) part
	    						.getAdapter(MouseWheelHelper.class);
	    				if (helper != null)
	    					helper.handleMouseWheelScrolled(event);
	    				part = part.getParent();
	    			} while (event.doit && part != null);
	    		}
	    	}
	    */

	    return GraphicalViewerImpl;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 155 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-11
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(156),
	    __webpack_require__(130),
	    __webpack_require__(165),
	    __webpack_require__(166),
	    __webpack_require__(73),
	    __webpack_require__(72),
	    __webpack_require__(69),
	    __webpack_require__(12),
	    __webpack_require__(65)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    FreeformGraphicalRootEditPart,
	    LayerConstants,
	    FreeformFeedbackLayer,
	    ScalableRootEditPart,
	    FreeformLayer,
	    ScalableFreeformLayeredPane,
	    ScalableLayeredPane,
	    Rectangle, Layer
	) {
	    'use strict';

	    var ScalableFreeformRootEditPart = function ScalableFreeformRootEditPart() {
	        ScalableFreeformRootEditPart.superclass.constructor.call(this);
	    };

	    util.defineClass(ScalableFreeformRootEditPart, FreeformGraphicalRootEditPart, {
	        createLayers: function(layeredPane) {
	            layeredPane.add(this.getScaledLayers(), LayerConstants.SCALABLE_LAYERS);
	            layeredPane.add(new FreeformLayer('handleLayer'), LayerConstants.HANDLE_LAYER);
	            layeredPane.add(new FreeformFeedbackLayer("feedbackLayer"), LayerConstants.FEEDBACK_LAYER);
	            // layeredPane.add(new GuideLayer('guideLayer'),LayerConstants.GUIDE_LAYER);
	        },
	        createScaledLayers: function() {
	            var layers = new ScalableFreeformLayeredPane("scaledLayers");
	            //layers.add(this.getGridLayer(),LayerConstants.GRID_LAYER);
	            layers.add(this.getPrintableLayers(), LayerConstants.PRINTABLE_LAYERS);
	            layers.add(new FreeformFeedbackLayer('scaledFeedbackLayer'), LayerConstants.SCALED_FEEDBACK_LAYER);

	            return layers;
	        },
	        getZoomManager: function() {
	            return this.zoomManager;
	        },
	        getScaledLayers: function() {
	            if (this._scaledLayeredPane == null) {
	                this._scaledLayeredPane = this.createScaledLayers();
	            }
	            return this._scaledLayeredPane;
	        },
	        register: function() {
	            ScalableRootEditPart.superclass.register.call(this);
	            this.getViewer().setProperty('ZoomManager', this.getZoomManager());

	        },
	        unregister: function() {
	            this.getViewer().removePropertyChangeListener(this.gridListener);
	            ScalableRootEditPart.superclass.unregister.call(this);
	            this.getViewer().setProperty('ZoomManager', null);
	        }

	    });

	    return ScalableFreeformRootEditPart;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 156 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-22
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(157),
	    __webpack_require__(130),
	    __webpack_require__(165),
	    __webpack_require__(131),
	    __webpack_require__(116),
	    __webpack_require__(70),
	    __webpack_require__(73),
	    __webpack_require__(74)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    SimpleRootEditPart,
	    LayerConstants,
	    FreeformFeedbackLayer,
	    LayerManager,
	    FreeformViewport,
	    FreeformLayeredPane,
	    FreeformLayer,
	    ConnectionLayer
	) {
	    'use strict';

	    var FreeformGraphicalRootEditPart = function() {
	        FreeformGraphicalRootEditPart.superclass.constructor.call(this);
	        this.innerLayers = null;
	        this.printableLayers = null;
	        this.gridListener = {};
	        // var that = this;
	        // this.gridListener.propertyChange = function (evt) {
	        // var property = evt.getPropertyName();
	        // if (property === SnapToGrid.PROPERTY_GRID_ORIGIN || property === SnapToGrid.PROPERTY_GRID_SPACING || property === SnapToGrid.PROPERTY_GRID_VISIBLE) {
	        // that.refreshGridLayer();
	        // }
	        // }
	    };

	    util.defineClass(FreeformGraphicalRootEditPart, SimpleRootEditPart, {
	        createFigure: function() {
	            var viewport = new FreeformViewport(); //      FreeformViewport
	            this.innerLayers = new FreeformLayeredPane(); //      FreeformLayeredPane
	            this.createLayers(this.innerLayers);
	            viewport.setContents(this.innerLayers);
	            return viewport;
	        },
	        createGridLayer: function() {
	            throw 'unsurppoted';
	            //return new COM.draw2d.GridLayer();
	        },
	        createLayers: function(layeredPane) {
	            // layeredPane.add(this.createGridLayer(), LayerConstants.GRID_LAYER);
	            layeredPane.add(this.getPrintableLayers(), LayerConstants.PRINTABLE_LAYERS);
	            layeredPane.add(new FreeformLayer(), LayerConstants.HANDLE_LAYER); //FreeformLayer
	            layeredPane.add(new FreeformFeedbackLayer(), LayerConstants.FEEDBACK_LAYER); //FeedbackLayer
	            // layeredPane.add(new GuideLayer(), LayerConstants.GUIDE_LAYER);             //GuideLayer
	        },
	        createPrintableLayers: function() {
	            var layeredPane = new FreeformLayeredPane(); //FreeformLayeredPane
	            layeredPane.add(new FreeformLayer(), LayerConstants.PRIMARY_LAYER); //FreeformLayeredPane
	            layeredPane.add(new ConnectionLayer(), LayerConstants.CONNECTION_LAYER); //ConnectionLayer
	            return layeredPane;
	        },
	        getContentPane: function() {
	            return this.getLayer(LayerConstants.PRIMARY_LAYER);
	        },
	        getDragTracker: function(req) {
	            throw 'unsurppoted';
	            // return new COM.gef.MarqueeDragTracker();
	        },
	        getLayer: function(key) {
	            if (this.innerLayers == null) {
	                return null;
	            }
	            var layer = this.innerLayers.getLayer(key);
	            if (layer != null) {
	                return layer;
	            }
	            if (this.printableLayers == null) {
	                return null;
	            }
	            return this.printableLayers.getLayer(key);
	        },
	        getModel: function() {
	            return LayerManager.ID; //LayerManager
	        },
	        getPrintableLayers: function() {
	            if (this.printableLayers == null) {
	                this.printableLayers = this.createPrintableLayers();
	            }
	            return this.printableLayers;
	        },
	        refreshGridLayer: function() {
	            // var visible = false;
	            // var grid = this.getLayer(LayerConstants.GRID_LAYER);
	            // var val = this.getViewer().getProperty(SnapToGrid.PROPERTY_GRID_VISIBLE);
	            // if (val != null) {
	            // visible = val;
	            // }
	            // grid.setOrigin(this.getViewer().getProperty(SnapToGrid.PROPERTY_GRID_ORIGIN));
	            // grid.setSpacing(this.getViewer().getProperty(SnapToGrid.PROPERTY_GRID_SPACING));
	            // grid.setVisible(visible);
	        },
	        register: function() {
	            FreeformGraphicalRootEditPart.superclass.register.call(this);
	            if (this.getLayer(LayerConstants.GRID_LAYER) != null) {
	                this.getViewer().addPropertyChangeListener(this.gridListener);
	                this.refreshGridLayer();
	            }
	        },
	        unregister: function() {
	            this.getViewer().removePropertyChangeListener(this.gridListener);
	            FreeformGraphicalRootEditPart.superclass.unregister.call(this);
	        }
	    });

	    // FeedbackLayer模块已有，在此将其注销
	    // var FreeformFeedbackLayer = function (id) {
	    //     FreeformFeedbackLayer.superclass.constructor.call(this);
	    //     // var rect = new RectangleFigure();
	    //     // rect.setBackgroundColor(new Color(10,200,10)); //Color
	    //     // rect.setOpaque(true);
	    //     // this.add(rect,new Rectangle(10,10,50,50));
	    //     this.setEnabled(false);
	    // }
	    //
	    // util.defineClass(FreeformFeedbackLayer, FreeformLayer,{});      //FreeformLayer

	    return FreeformGraphicalRootEditPart;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 157 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-22
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(158),
	    __webpack_require__(135),
	    __webpack_require__(25),
	    __webpack_require__(21),
	    __webpack_require__(67)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    AbstractGraphicalEditPart,
	    Command,
	    Figure,
	    Color,
	    StackLayout
	) {

	    'use strict';

	    var SimpleRootEditPart = function() {
	        SimpleRootEditPart.superclass.constructor.call(this);
	        this.contents = null;
	        this.viewer = null;
	    };

	    util.defineClass(SimpleRootEditPart, AbstractGraphicalEditPart, {
	        createEditPolicies: Function.emptyFunction,
	        createFigure: function() {
	            var figure = new Figure('simpleRootEditPart-figure'); //Figure
	            figure.setBackgroundColor(new Color(10, 200, 10)); //Color
	            figure.setOpaque(true);
	            figure.setLayoutManager(new StackLayout()); //StackLayout
	            return figure;
	        },
	        getCommand: function(req) {
	            var command = new Command();
	            command.canExecute = function() {
	                return false;
	            };
	            command.canUndo = function() {
	                return false;
	            };
	            return command;
	        },
	        getContents: function() {
	            return this.contents;
	        },
	        getRoot: function() {
	            return this;
	        },
	        getViewer: function() {
	            return this.viewer;
	        },
	        refreshChildren: Function.emptyFunction,
	        setContents: function(editpart) {
	            if (this.contents === editpart) {
	                return;
	            }
	            if (this.contents != null) {
	                this.removeChild(this.contents);
	            }
	            this.contents = editpart;
	            if (this.contents != null) {
	                this.addChild(this.contents, 0);
	            }
	        },
	        setViewer: function(newViewer) {
	            if (this.viewer === newViewer) {
	                return;
	            }
	            if (this.viewer != null) {
	                this.unregister();
	            }
	            this.viewer = newViewer;
	            if (this.viewer != null) {
	                this.register();
	            }
	        }
	    });

	    return SimpleRootEditPart;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 158 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-22
	 * @abstract
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(159),
	    __webpack_require__(160),
	    __webpack_require__(131),
	    __webpack_require__(5)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractEditPart, DragEditPartsTracker, LayerManager, Map) {
	    'use strict';

	    var AbstractGraphicalEditPart = function() {
	        AbstractGraphicalEditPart.superclass.constructor.call(this);
	        this.figure = null;
	        this.sourceConnections = null;
	        this.targetConnections = null;
	    };

	    util.defineClass(AbstractGraphicalEditPart, AbstractEditPart, {
	        activate: function() {
	            AbstractGraphicalEditPart.superclass.activate.call(this);
	            var l = this.getSourceConnections();
	            for (var i = 0; i < l.length; i++) {
	                l[i].activate();
	            }
	        },
	        addChildVisual: function(childEditPart, index) {
	            var child = childEditPart.getFigure();
	            this.getContentPane().add(child, null, index);
	        },
	        addNodeListener: function(listener) {
	            this.eventListeners.addListener('NodeListener', listener); //NodeListener
	        },
	        addNotify: function() {
	            AbstractGraphicalEditPart.superclass.addNotify.call(this);
	            var conns;
	            var i;
	            conns = this.getSourceConnections();
	            for (i = 0; i < conns.length; i++) {
	                conns[i].setSource(this);
	            }
	            conns = this.getTargetConnections();
	            for (i = 0; i < conns.length; i++) {
	                conns[i].setTarget(this);
	            }
	        },
	        addSourceConnection: function(connection, index) {
	            this.primAddSourceConnection(connection, index);
	            var source = connection.getSource();
	            if (source != null) {
	                util.Array.remove(source.getSourceConnections(), connection);
	            }
	            connection.setSource(this);
	            if (this.isActive()) {
	                connection.activate();
	            }
	            this.fireSourceConnectionAdded(connection, index);
	        },
	        addTargetConnection: function(connection, index) {
	            this.primAddTargetConnection(connection, index);
	            var target = connection.getTarget();
	            if (target != null) {
	                util.Array.remove(target.getTargetConnections(), connection);
	            }
	            connection.setTarget(this);
	            this.fireTargetConnectionAdded(connection, index);
	        },
	        createConnection: function(model) {
	            return this.getViewer().getEditPartFactory().createEditPart(this, model);
	        },
	        createFigure: Function.needOverride,
	        createOrFindConnection: function(model) {
	            var conx = this.getViewer().getEditPartRegistry().get(model);
	            if (conx != null) {
	                return conx;
	            }
	            return this.createConnection(model);
	        },
	        deactivate: function() {
	            var l = this.getSourceConnections();
	            for (var i = 0; i < l.length; i++) {
	                l[i].deactivate();
	            }
	            AbstractGraphicalEditPart.superclass.deactivate.call(this);
	        },
	        fireRemovingSourceConnection: function(connection, index) {
	            if (this.eventListeners == null) {
	                return;
	            }
	            var listeners = this.eventListeners.getListeners('NodeListener'); //NodeListener
	            var listener = null;
	            while (listeners.hasNext()) {
	                listener = listeners.next();
	                listener.removingSourceConnection(connection, index);
	            }
	        },
	        fireRemovingTargetConnection: function(connection, index) {
	            if (this.eventListeners == null) {
	                return;
	            }
	            var listeners = this.eventListeners.getListeners('NodeListener'); //NodeListener
	            var listener = null;
	            while (listeners.hasNext()) {
	                listener = listeners.next();
	                listener.removingTargetConnection(connection, index);
	            }
	        },
	        fireSourceConnectionAdded: function(connection, index) {
	            if (this.eventListeners == null) {
	                return;
	            }
	            var listeners = this.eventListeners.getListeners('NodeListener'); //NodeListener
	            var listener = null;
	            while (listeners.hasNext()) {
	                listener = listeners.next();
	                listener.sourceConnectionAdded(connection, index);
	            }
	        },
	        fireTargetConnectionAdded: function(connection, index) {
	            if (this.eventListeners == null) {
	                return;
	            }
	            var listeners = this.eventListeners.getListeners('NodeListener'); //NodeListener
	            var listener = null;
	            while (listeners.hasNext()) {
	                listener = listeners.next();
	                listener.targetConnectionAdded(connection, index);
	            }
	        },
	        getContentPane: function() {
	            return this.getFigure();
	        },
	        getDragTracker: function(request) {
	            return new DragEditPartsTracker(this); //DragEditPartsTracker
	        },
	        getFigure: function() {
	            if (this.figure == null) {
	                this.setFigure(this.createFigure());
	            }
	            return this.figure;
	        },
	        getLayer: function(layer) {
	            var manager = this.getViewer().getEditPartRegistry().get(LayerManager.ID); // LayerManager
	            return manager.getLayer(layer);
	        },
	        getModelSourceConnections: function() {
	            return [];
	        },
	        getModelTargetConnections: function() {
	            return [];
	        },
	        getSourceConnections: function() {
	            if (this.sourceConnections == null) {
	                return [];
	            }
	            return this.sourceConnections;
	        },
	        getTargetConnections: function() {
	            if (this.targetConnections == null) {
	                return [];
	            }
	            return this.targetConnections;
	        },
	        isSelectable: function() {
	            var superSelectable = AbstractGraphicalEditPart.superclass.isSelectable.call(this);
	            return superSelectable && this.getFigure() != null && this.getFigure().isShowing();
	        },
	        primAddSourceConnection: function(connection, index) {
	            if (this.sourceConnections == null) {
	                this.sourceConnections = [];
	            }
	            util.Array.add(this.sourceConnections, connection, index);
	        },
	        primAddTargetConnection: function(connection, index) {
	            if (this.targetConnections == null) {
	                this.targetConnections = [];
	            }
	            util.Array.add(this.targetConnections, connection, index);
	        },
	        primRemoveSourceConnection: function(connection) {
	            util.Array.remove(this.sourceConnections, connection);
	        },
	        primRemoveTargetConnection: function(connection) {
	            util.Array.remove(this.targetConnections, connection);
	        },
	        refresh: function() {
	            AbstractGraphicalEditPart.superclass.refresh.call(this);
	            this.refreshSourceConnections();
	            this.refreshTargetConnections();
	        },
	        refreshSourceConnections: function() {
	            var i;
	            var editPart;
	            var model;
	            var sourceConnections = this.getSourceConnections();
	            var size = sourceConnections.length;
	            var modelToEditPart = new Map(); //Map
	            if (size > 0) {
	                for (i = 0; i < size; i++) {
	                    editPart = sourceConnections[i];
	                    modelToEditPart.put(editPart.getModel(), editPart);
	                }
	            }
	            var modelObjects = this.getModelSourceConnections();
	            if (modelObjects == null) {
	                modelObjects = [];
	            }
	            for (i = 0; i < modelObjects.length; i++) {
	                model = modelObjects[i];
	                if (i < sourceConnections.length && sourceConnections[i].getModel() === model) {
	                    continue;
	                }
	                editPart = modelToEditPart.get(model);
	                if (editPart != null) {
	                    this.reorderSourceConnection(editPart, i);
	                } else {
	                    editPart = this.createOrFindConnection(model);
	                    this.addSourceConnection(editPart, i);
	                }

	            }
	            size = sourceConnections.length;
	            if (i < size) {
	                var trash = [];
	                for (; i < size; i++) {
	                    trash.push(sourceConnections[i]);
	                }
	                for (i = 0; i < trash.length; i++) {
	                    this.removeSourceConnection(trash[i]);
	                }
	            }
	        },
	        refreshTargetConnections: function() {
	            var i;
	            var editPart;
	            var model;
	            var targetConnections = this.getTargetConnections();
	            var size = targetConnections.length;
	            var modelToEditPart = new Map(); //Map
	            if (size > 0) {
	                for (i = 0; i < size; i++) {
	                    editPart = this.targetConnections[i];
	                    modelToEditPart.put(editPart.getModel(), editPart);
	                }
	            }
	            var modelObjects = this.getModelTargetConnections();
	            if (modelObjects == null) {
	                modelObjects = [];
	            }
	            for (i = 0; i < modelObjects.length; i++) {
	                model = modelObjects[i];
	                if (i < targetConnections.length && targetConnections[i].getModel() === model) {
	                    continue;
	                }
	                editPart = modelToEditPart.get(model);
	                if (editPart != null) {
	                    this.reorderTargetConnection(editPart, i);
	                } else {
	                    editPart = this.createOrFindConnection(model);
	                    this.addTargetConnection(editPart, i);
	                }
	            }

	            size = targetConnections.length;
	            if (i < size) {
	                var trash = [];
	                for (; i < size; i++) {
	                    trash.push(targetConnections[i]);
	                }
	                for (i = 0; i < trash.length; i++) {
	                    this.removeTargetConnection(trash[i]);
	                }
	            }
	        },
	        registerVisuals: function() {
	            this.getViewer().getVisualPartMap().put(this.getFigure(), this);
	        },
	        removeChildVisual: function(childEditPart) {
	            var child = childEditPart.getFigure();
	            this.getContentPane().remove(child);
	        },
	        removeNodeListener: function(listener) {
	            this.eventListeners.removeListener('NodeListener', listener); //NodeListener
	        },
	        removeNotify: function() {
	            var conns;
	            var cep;
	            conns = this.getSourceConnections();
	            for (var i = 0; i < conns.length; i++) {
	                cep = [i];
	                if (cep.getSource() === this) {
	                    cep.setSource(null);
	                }
	            }
	            conns = this.getTargetConnections();
	            for (var i = 0; i < conns.length; i++) {
	                cep = conns[i];
	                if (cep.getTarget() === this) {
	                    cep.setTarget(null);
	                }
	            }
	            AbstractGraphicalEditPart.superclass.removeNotify.call(this);
	        },
	        removeSourceConnection: function(connection) {
	            this.fireRemovingSourceConnection(connection, util.Array.indexOf(this.getSourceConnections(), connection));
	            if (connection.getSource() === this) {
	                connection.deactivate();
	                connection.setSource(null);
	            }
	            this.primRemoveSourceConnection(connection);
	        },
	        removeTargetConnection: function(connection) {
	            this.fireRemovingTargetConnection(connection, util.Array.indexOf(this.getTargetConnections(), connection));
	            if (connection.getTarget() === this) {
	                connection.setTarget(null);
	            }
	            this.primRemoveTargetConnection(connection);
	        },
	        reorderChild: function(child, index) {
	            var childFigure = child.getFigure();
	            var layout = this.getContentPane().getLayoutManager();
	            var constraint = null;
	            if (layout != null) {
	                constraint = layout.getConstraint(childFigure);
	            }
	            AbstractGraphicalEditPart.superclass.reorderChild.call(this, child, index);
	            this.setLayoutConstraint(child, childFigure, constraint);
	        },
	        reorderSourceConnection: function(connection, index) {
	            this.primRemoveSourceConnection(connection);
	            this.primAddSourceConnection(connection, index);
	        },
	        reorderTargetConnection: function(connection, index) {
	            this.primRemoveTargetConnection(connection);
	            this.primAddTargetConnection(connection, index);
	        },
	        setFigure: function(figure) {
	            this.figure = figure;
	        },
	        setLayoutConstraint: function(child, childFigure, constraint) {
	            childFigure.getParent().setConstraint(childFigure, constraint);
	        },
	        unregisterVisuals: function() {
	            this.getViewer().getVisualPartMap().remove(this.getFigure());
	        }
	    });

	    return AbstractGraphicalEditPart;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 159 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-19
	 * @abstract
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(129),
	    __webpack_require__(140),
	    __webpack_require__(29),
	    __webpack_require__(5)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, EditPart, RequestConstants, EventListenerList, Map) {
	    'use strict';

	    var AbstractEditPart = function(id) {

	        AbstractEditPart.superclass.constructor.call(this);
	        this.model = null;
	        this.flags = 0;
	        this.parent = null;
	        this.selected = 0;
	        this.policies = [];
	        this.children = [];
	        this.eventListeners = new EventListenerList();

	        AbstractEditPart.FLAG_ACTIVE = 1;
	        AbstractEditPart.FLAG_FOCUS = 2;
	        AbstractEditPart.MAX_FLAG = AbstractEditPart.FLAG_FOCUS;

	    };
	    util.defineClass(AbstractEditPart, EditPart, {
	        activate: function() {
	            this.setFlag(AbstractEditPart.FLAG_ACTIVE, true);
	            this.activateEditPolicies();
	            var c = this.getChildren();
	            for (var i = 0; i < c.length; i++) {
	                c[i].activate();
	            }
	            this.fireActivated();
	        },
	        activateEditPolicies: function() {
	            for (var i = 1; i < this.policies.length; i += 2) {
	                this.policies[i].activate();
	            }
	        },
	        addChild: function(child, index) {
	            if (!child) {
	                throw { 'type': '空值', 'message': 'child为空.' };
	            }
	            if (index >= 0) {
	                this.getChildren().splice(index, 0, child);
	            } else {
	                index = this.children.length;
	                this.getChildren().push(child);
	            }
	            child.setParent(this);
	            this.addChildVisual(child, index);
	            child.addNotify();
	            if (this.isActive()) {
	                child.activate();
	            }
	            this.fireChildAdded(child, index);
	        },
	        addChildVisual: Function.needOverride,

	        addEditPartListener: function(listener) {
	            this.eventListeners.addListener('EditPartListener', listener);
	        },

	        addNotify: function() {
	            this.register();
	            this.createEditPolicies();
	            var children = this.getChildren();
	            for (var i = 0; i < children.length; i++) {
	                children[i].addNotify();
	            }
	            this.refresh();
	        },

	        createChild: function(model) {
	            return this.getViewer().getEditPartFactory().createEditPart(this, model);
	        },

	        createEditPolicies: Function.needOverride,

	        deactivate: function() {
	            var c = this.getChildren();
	            for (var i = 0; i < c.length; i++) {
	                c[i].deactivate();
	            }
	            this.deactivateEditPolicies();
	            this.setFlag(AbstractEditPart.FLAG_ACTIVE, false);
	            this.fireDeactivated();
	        },

	        deactivateEditPolicies: function() {
	            for (var i = 1; i < this.policies.length; i += 2) {
	                this.policies[i].deactivate();
	            }
	        },

	        eraseSourceFeedback: function(request) {
	            if (this.isActive()) {
	                for (var i = 1; i < this.policies.length; i += 2) {
	                    this.policies[i].eraseSourceFeedback(request);
	                }
	            }
	        },

	        eraseTargetFeedback: function(request) {
	            if (this.isActive()) {
	                for (var i = 1; i < this.policies.length; i += 2) {
	                    this.policies[i].eraseTargetFeedback(request);
	                }
	            }
	        },

	        fireActivated: function() {
	            var listeners = this.getEventListeners('EditPartListener');
	            while (listeners.hasNext()) {
	                listeners.next().partActivated(this);
	            }
	        },

	        fireChildAdded: function(child, index) {
	            var listeners = this.getEventListeners('EditPartListener');
	            while (listeners.hasNext()) {
	                listeners.next().childAdded(child, index);
	            }
	        },

	        fireDeactivated: function() {
	            var listeners = this.getEventListeners('EditPartListener');
	            while (listeners.hasNext()) {
	                listeners.next().partDeactivated(this);
	            }
	        },

	        fireRemovingChild: function(child, index) {
	            var listeners = this.getEventListeners('EditPartListener');
	            while (listeners.hasNext()) {
	                listeners.next().removingChild(child, index);
	            }
	        },

	        fireSelectionChanged: function() {
	            var listeners = this.getEventListeners('EditPartListener');
	            while (listeners.hasNext()) {
	                listeners.next().selectedStateChanged(this);
	            }
	        },

	        getChildren: function() {
	            if (this.children == null) {
	                this.children = [];
	            }
	            return this.children;
	        },

	        getCommand: function(request) {
	            var command = null;

	            for (var i = 1; i < this.policies.length; i += 2) {
	                if (command != null) {
	                    command = command.chain(this.policies[i].getCommand(request));
	                } else {
	                    command = this.policies[i].getCommand(request);
	                }
	            }
	            return command;
	        },

	        getEventListeners: function(clazz) {
	            return this.eventListeners.getListeners(clazz);
	        },

	        getEditPolicy: function(key) {
	            if (this.policies != null) {
	                for (var i = 0; i < this.policies.length; i += 2) {
	                    if (this.policies[i] === key) {
	                        return this.policies[i + 1];
	                    }
	                }
	            }
	            return null;
	        },

	        getFlag: function(flag) {
	            return (this.flags & flag) != 0;
	        },

	        getModel: function() {
	            return this.model;
	        },

	        getModelChildren: function() {
	            return [];
	        },

	        getParent: function() {
	            return this.parent;
	        },

	        getRoot: function() {
	            if (this.getParent() == null) {
	                return null;
	            }
	            return this.getParent().getRoot();
	        },

	        getSelected: function() {
	            return this.selected;
	        },

	        getTargetEditPart: function(request) {
	            var editPart;
	            for (var i = 1; i < this.policies.length; i += 2) {
	                editPart = this.policies[i].getTargetEditPart(request);
	                if (editPart != null) {
	                    return editPart;
	                }
	            }

	            if (RequestConstants.REQ_SELECTION == request.getType()) {
	                if (this.isSelectable()) {
	                    return this;
	                }
	            }
	            return null;
	        },

	        getViewer: function() {
	            var root = this.getRoot();
	            if (root == null) {
	                return null;
	            }
	            return root.getViewer();
	        },

	        hasFocus: function() {
	            return this.getFlag(AbstractEditPart.FLAG_FOCUS);
	        },

	        installEditPolicy: function(key, editPolicy) {
	            if (key == null) {
	                throw { 'type': '空值', 'message': 'key为空' };
	            }
	            if (this.policies == null) {
	                this.policies = [];
	                this.policies.push(key);
	                this.policies.push(editPolicy);
	            } else {
	                var index = 0;
	                while (index < this.policies.length && key !== this.policies[index]) {
	                    index += 2;
	                }
	                if (index < this.policies.length) {
	                    index++;
	                    var old = this.policies[index];
	                    if (old != null && this.isActive()) {
	                        old.deactivate();
	                    }
	                    this.policies[index] = editPolicy;
	                } else {
	                    this.policies.push(key);
	                    this.policies.push(editPolicy);
	                }
	            }

	            if (editPolicy != null) {
	                editPolicy.setHost(this);
	                if (this.isActive()) {
	                    editPolicy.activate();
	                }
	            }
	        },

	        isActive: function() {
	            return this.getFlag(AbstractEditPart.FLAG_ACTIVE);
	        },

	        isSelectable: function() {
	            return true;
	        },

	        performRequest: Function.emptyFunction,

	        refresh: function() {
	            this.refreshVisuals();
	            this.refreshChildren();
	        },

	        refreshChildren: function() {
	            var i;
	            var editPart;
	            var model;
	            var children = this.getChildren();
	            var size = children.length;
	            var trash;
	            var ep;

	            var modelToEditPart = new Map();

	            if (size > 0) {
	                for (i = 0; i < size; i++) {
	                    editPart = children[i];
	                    modelToEditPart.put(editPart.getModel(), editPart);
	                }
	            }

	            var modelObjects = this.getModelChildren();
	            for (i = 0; i < modelObjects.length; i++) {
	                model = modelObjects[i];
	                //model与editPart位置相同
	                if (i < children.length && children[i].getModel() === model) {
	                    continue;
	                }
	                editPart = modelToEditPart.get(model);

	                if (editPart != null) {
	                    //位置不同，调整位置
	                    this.reorderChild(editPart, i);
	                } else {
	                    //没有editPart,创建并加入
	                    editPart = this.createChild(model);
	                    this.addChild(editPart, i);
	                }
	            }

	            //移出多余的editPart
	            size = children.length;
	            if (i < size) {
	                trash = [];
	                for (; i < size; i++) {
	                    trash.push(children[i]);
	                }
	                for (i = 0; i < trash.length; i++) {
	                    ep = trash[i];
	                    this.removeChild(ep);
	                }
	            }
	        },

	        refreshVisuals: Function.emptyFunction,

	        register: function() {
	            this.registerModel();
	            this.registerVisuals();
	        },

	        registerModel: function() {
	            this.getViewer().getEditPartRegistry().put(this.getModel(), this);
	        },

	        registerVisuals: Function.emptyFunction,

	        removeChild: function(child) {
	            if (child == null) {
	                throw { 'type': '空值', 'messag': 'child为空' };
	            }
	            var index = util.Array.indexOf(this.getChildren(), child);
	            if (index < 0) {
	                return;
	            }

	            this.fireRemovingChild(child, index);
	            if (this.isActive()) {
	                child.deactivate();
	            }
	            child.removeNotify();
	            this.removeChildVisual(child);
	            child.setParent(null);
	            util.Array.removeItem(this.getChildren(), child);
	        },

	        removeChildVisual: Function.needOverride,

	        removeEditPartListener: function(listener) {
	            this.eventListeners.removeListener('EditPartListener', listener);
	        },

	        removeEditPolicy: function(key) {
	            if (this.policies == null) {
	                return;
	            }
	            for (var i = 0; i < this.policies.length; i += 2) {
	                if (key === this.policies[i]) {
	                    i++;
	                    var policy = this.policies[i];
	                    this.policies[i] = null;
	                    if (this.isActive() && policy != null) {
	                        policy.deactivate();
	                    }
	                }
	            }
	        },

	        removeNotify: function() {
	            if (this.getSelected() != EditPart.SELECTED_NONE) {
	                this.getViewer().deselect(this);
	            }
	            if (this.hasFocus()) {
	                this.getViewer().setFocus(null);
	            }
	            var children = this.getChildren();
	            for (var i = 0; i < children.length; i++) {
	                children[i].removeNotify();
	            }
	            this.unregister();
	        },

	        reorderChild: function(editpart, index) {
	            this.removeChildVisual(editpart);
	            var children = this.getChildren();
	            util.Array.remove(children, editpart);
	            util.Array.add(children, editpart, index);
	            this.addChildVisual(editpart, index);
	        },

	        setFlag: function(flag, value) {
	            if (value) {
	                this.flags |= flag;
	            } else {
	                this.flags &= ~flag;
	            }
	        },

	        setFocus: function(value) {
	            if (!this.isSelectable() && value) {
	                throw { 'type': '非法操作', 'message': '不能将一个不可选的editPart设为焦点' };
	            }
	            if (this.hasFocus() === value) {
	                return;
	            }
	            this.setFlag(AbstractEditPart.FLAG_FOCUS, value);
	            this.fireSelectionChanged();
	        },

	        setModel: function(model) {
	            this.model = model;
	        },

	        setParent: function(parent) {
	            this.parent = parent;
	        },

	        setSelected: function(value) {
	            if (!this.isSelectable() && value != EditPart.SELECTED_NONE) {
	                throw { 'type': '非法操作', 'message': '不能选中一个不可选的editPart' };
	            }
	            if (this.selected === value) {
	                return;
	            }
	            this.selected = value;
	            this.fireSelectionChanged();
	        },

	        showSourceFeedback: function(request) {
	            if (!this.isActive()) {
	                return;
	            }
	            for (var i = 1; i < this.policies.length; i += 2) {
	                this.policies[i].showSourceFeedback(request);

	            }
	        },

	        showTargetFeedback: function(request) {
	            if (!this.isActive()) {
	                return;
	            }
	            for (var i = 1; i < this.policies.length; i += 2) {
	                this.policies[i].showTargetFeedback(request);

	            }
	        },

	        toString: function() {
	            var c = 'AbstractEditPart' + '(' + this.getModel() + ')'; //$NON-NLS-2$//$NON-NLS-1$
	            return c;
	        },

	        understandsRequest: function(req) {
	            for (var i = 1; i < this.policies.length; i += 2) {
	                if (this.policies[i].understandsRequest(req)) {
	                    return true;
	                }
	            }
	            return false;
	        },

	        unregister: function() {
	            this.unregisterVisuals();
	            this.unregisterModel();
	        },

	        unregisterModel: function() {
	            var registry = this.getViewer().getEditPartRegistry();
	            if (registry.get(this.getModel()) === this) {
	                registry.remove(this.getModel());
	            }
	        },

	        unregisterVisuals: Function.emptyFunction
	    });

	    return AbstractEditPart;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 160 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-13
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(161),
	    __webpack_require__(147),
	    __webpack_require__(127),
	    __webpack_require__(162),
	    __webpack_require__(140),
	    __webpack_require__(135),
	    __webpack_require__(129),
	    __webpack_require__(164),
	    __webpack_require__(130),
	    __webpack_require__(9),
	    __webpack_require__(111),
	    __webpack_require__(12),
	    __webpack_require__(131)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    SelectEditPartTracker,
	    AbstractTool,
	    KeyStroke,
	    ChangeBoundsRequest,
	    RequestConstants,
	    Command,
	    EditPart,
	    ToolUtilities,
	    LayerConstants,
	    Point,
	    Cursor,
	    Rectangle,
	    LayerManager
	) {
	    'use strict';

	    var DragEditPartsTracker = function(owner) {
	        DragEditPartsTracker.superclass.constructor.call(this, owner);
	        this.exclusionSet = null;
	        this.sourceRelativeStartPoint = null;
	        this.sourceRectangle = null;
	        this.cloneActive = false;
	        this.compoundSrcRect = null;
	        this.setDisabledCursor(Cursor.DISABLE);
	    };

	    // var LayerHelper = COM.gef.LayerHelper;

	    //static properties
	    DragEditPartsTracker.FLAG_SOURCE_FEEDBACK = SelectEditPartTracker.MAX_FLAG << 1;
	    DragEditPartsTracker.MAX_FLAG = DragEditPartsTracker.FLAG_SOURCE_FEEDBACK;
	    DragEditPartsTracker.MODIFIER_CLONE = KeyStroke.CTRL;

	    util.defineClass(DragEditPartsTracker, SelectEditPartTracker, {
	        acceptClone: function(e) {
	            var key = e.keyCode;
	            if (!(this.isInState(AbstractTool.STATE_DRAG_IN_PROGRESS | AbstractTool.STATE_ACCESSIBLE_DRAG | AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS))) {
	                return false;
	            }
	            return (key == DragEditPartsTracker.MODIFIER_CLONE);
	        },
	        acceptSHIFT: function(e) {
	            return this.isInState(AbstractTool.STATE_DRAG_IN_PROGRESS | AbstractTool.STATE_ACCESSIBLE_DRAG | AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS) && e.keyCode == KeyStroke.SHIFT;
	        },
	        getDefaultCursor: function() {
	            if (this.isCloneActive()) {
	                return Cursor.CURSOR_TREE_ADD;
	            }
	            return DragEditPartsTracker.superclass.getDefaultCursor.call(this);
	        },
	        commitDrag: function() {
	            this.eraseSourceFeedback();
	            this.eraseTargetFeedback();
	            this.performDrag();
	            this.setState(AbstractTool.STATE_TERMINAL);
	        },
	        captureSourceDimensions: function() {
	            var editparts = this.getOperationSet();
	            for (var i = 0; i < editparts.length; i++) {
	                var child = editparts[i];
	                var figure = child.getFigure();
	                var bounds = figure.getBounds().getCopy();
	                figure.translateToAbsolute(bounds);

	                if (this.compoundSrcRect == null) {
	                    this.compoundSrcRect = new Rectangle(bounds.x, bounds.y, bounds.width, bounds.height);
	                } else {
	                    this.compoundSrcRect = this.compoundSrcRect.union(bounds.x, bounds.y, bounds.width, bounds.height);
	                }
	                if (child == this.getSourceEditPart()) {
	                    this.sourceRectangle = bounds;
	                }
	            }
	            if (this.sourceRectangle == null) {
	                var sourceFigure = this.getSourceEditPart().getFigure();
	                this.sourceRectangle = new Rectangle(sourceFigure.getBounds());
	                sourceFigure.translateToAbsolute(this.sourceRectangle);
	            }
	        },
	        createOperationSet: function() {
	            if (this.getCurrentViewer() != null) {
	                var list = ToolUtilities.getSelectionWithoutDependants(this.getCurrentViewer());
	                ToolUtilities.filterEditPartsUnderstanding(list, this.getTargetRequest());
	                return list;
	            }
	            return [];
	        },
	        createTargetRequest: function() {
	            if (this.isCloneActive()) {
	                return new ChangeBoundsRequest(RequestConstants.REQ_CLONE);
	            } else {
	                return new ChangeBoundsRequest(RequestConstants.REQ_MOVE);
	            }
	        },
	        deactivate: function() {
	            this.eraseSourceFeedback();
	            DragEditPartsTracker.superclass.deactivate.call(this);
	            this.exclusionSet = null;
	            this.sourceRelativeStartPoint = null;
	            this.sourceRectangle = null;
	            this.compoundSrcRect = null;
	        },
	        eraseSourceFeedback: function() {
	            if (!this.getFlag(DragEditPartsTracker.FLAG_SOURCE_FEEDBACK)) {
	                return;
	            }
	            this.setFlag(DragEditPartsTracker.FLAG_SOURCE_FEEDBACK, false);
	            var editParts = this.getOperationSet();
	            for (var i = 0; i < editParts.length; i++) {
	                var editPart = editParts[i];
	                editPart.eraseSourceFeedback(this.getTargetRequest());
	            }
	        },
	        getCommand: function() {
	            var command = new Command.CompoundCommand();
	            command.setDebugLabel("Drag Object Tracker"); //$NON-NLS-1$

	            // Iterator iter = getOperationSet().iterator();
	            var operations = this.getOperationSet();
	            var request = this.getTargetRequest();

	            if (this.isCloneActive()) {
	                request.setType(RequestConstants.REQ_CLONE);
	            } else if (this.isMove()) {
	                request.setType(RequestConstants.REQ_MOVE);
	            } else {
	                request.setType(RequestConstants.REQ_ORPHAN);
	            }

	            if (!this.isCloneActive()) {
	                operations.forEach(function(editPart) {
	                    command.add(editPart.getCommand(request));
	                });
	            }

	            if (!this.isMove() || this.isCloneActive()) {
	                if (!this.isCloneActive()) {
	                    request.setType(RequestConstants.REQ_ADD);
	                }

	                if (this.getTargetEditPart() == null)
	                    command.add(Command.UNEXECUTABLE_COMMAND);
	                else {
	                    command.add(this.getTargetEditPart().getCommand(this.getTargetRequest()));
	                }
	            }
	            return command.unwrap();
	        },
	        getCommandName: function() {
	            if (this.isCloneActive()) {
	                return RequestConstants.REQ_CLONE;
	            } else if (this.isMove()) {
	                return RequestConstants.REQ_MOVE;
	            } else {
	                return RequestConstants.REQ_ADD;
	            }
	        },
	        getExclusionSet: function() {
	            if (this.exclusionSet == null) {
	                var set = this.getOperationSet();
	                this.exclusionSet = [];
	                for (var i = 0; i < set.length; i++) {
	                    var editpart = set[i];
	                    this.exclusionSet.push(editpart.getFigure());
	                }
	                //LayerManager layerManager = (LayerManager) getCurrentViewer().getEditPartRegistry().get(LayerManager.ID);
	                var layerManager = this.getCurrentViewer().getEditPartRegistry().get(LayerManager.ID);
	                if (layerManager != null) {
	                    this.exclusionSet.push(layerManager.getLayer(LayerConstants.CONNECTION_LAYER));
	                }
	            }
	            return this.exclusionSet;
	        },
	        handleAutoexpose: function() {
	            // updateTargetRequest();
	            // updateTargetUnderMouse();
	            // showTargetFeedback();
	            // showSourceFeedback();
	            // setCurrentCommand(getCommand());
	        },
	        handleButtonUp: function(button) {
	            if (this.stateTransition(AbstractTool.STATE_DRAG_IN_PROGRESS, AbstractTool.STATE_TERMINAL)) {
	                this.eraseSourceFeedback();
	                this.eraseTargetFeedback();
	                this.performDrag();
	                return true;
	            }
	            return DragEditPartsTracker.superclass.handleButtonUp.call(this, button);
	        },
	        handleDragInProgress: function() {
	            if (this.isInDragInProgress()) {
	                //Debugger.log("DragEditPartsTracker.handleDragInProgress - isInDragInProgress");
	                this.updateTargetRequest();
	                if (this.updateTargetUnderMouse()) {
	                    this.updateTargetRequest();
	                }
	                this.showTargetFeedback();
	                this.showSourceFeedback();
	                this.setCurrentCommand(this.getCommand());

	            }
	            return true;
	        },
	        handleHover: function() {
	            // if (isInDragInProgress())
	            // 	updateAutoexposeHelper();
	            return true;
	        },
	        handleInvalidInput: function() {
	            DragEditPartsTracker.superclass.handleInvalidInput.call(this);
	            this.eraseSourceFeedback();
	            return true;
	        },
	        handleKeyDown: function(e) {
	            // this.setAutoexposeHelper(null);
	            if (this.acceptArrowKey(e)) {
	                this.accStepIncrement();
	                if (this.stateTransition(AbstractTool.STATE_INITIAL,
	                        AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS)) {
	                    this.setStartLocation(this.getLocation());
	                }
	                // switch (e.keyCode) {
	                // 	case KeyStroke.ARROW_DOWN:
	                // 		this.placeMouseInViewer(this.getLocation().getTranslated(0, this.accGetStep()));
	                // 		break;
	                // 	case KeyStroke.ARROW_UP:
	                // 		this.placeMouseInViewer(getLocation()
	                // 				.getTranslated(0, -this.accGetStep()));
	                // 		break;
	                // 	case KeyStroke.ARROW_RIGHT:
	                // 		var stepping = this.accGetStep();
	                // 		if (this.isCurrentViewerMirrored()){
	                //       stepping = -stepping;
	                //     }
	                // 		this.placeMouseInViewer(this.getLocation().getTranslated(stepping, 0));
	                // 		break;
	                // 	case SWT.ARROW_LEFT:
	                // 		var step = -this.accGetStep();
	                // 		if (this.isCurrentViewerMirrored()){
	                // 			step = -step;
	                //     }
	                // 		this.placeMouseInViewer(this.getLocation().getTranslated(step, 0));
	                // 		break;
	                // }
	                return true;
	            } else if (this.acceptClone(e)) {
	                this.setCloneActive(true);
	                this.handleDragInProgress();
	                return true;
	            } else if (this.acceptSHIFT(e)) {
	                this.handleDragInProgress();
	                return true;
	            }

	            return false;
	        },
	        handleKeyUp: function(e) {
	            if (this.acceptArrowKey(e)) {
	                this.accStepReset();
	                return true;
	            } else if (this.acceptClone(e)) {
	                this.setCloneActive(false);
	                this.handleDragInProgress();
	                return true;
	            } else if (this.acceptSHIFT(e)) {
	                this.handleDragInProgress();
	                return true;
	            }
	            return false;
	        },
	        isCloneActive: function() {
	            return this.cloneActive;
	        },
	        isMove: function() {
	            var part = this.getSourceEditPart();
	            while (part != this.getTargetEditPart() && part != null) {
	                if (part.getParent() == this.getTargetEditPart() && part.getSelected() != EditPart.SELECTED_NONE) {
	                    return true;
	                }
	                part = part.getParent();
	            }
	            return false;
	        },
	        performDrag: function() {
	            this.executeCurrentCommand();
	        },
	        repairStartLocation: function() {
	            if (this.sourceRelativeStartPoint == null) {
	                return;
	            }
	            var figure = this.getSourceEditPart().getFigure();
	            var newStart = this.sourceRelativeStartPoint.getCopy();
	            figure.translateToAbsolute(newStart);
	            var delta = new Point(newStart.x - this.getStartLocation().x, newStart.y - this.getStartLocation().y);
	            this.setStartLocation(newStart);
	            if (this.sourceRectangle != null) {
	                this.sourceRectangle.translate(delta.x, delta.y);
	            }
	            if (this.compoundSrcRect != null) {
	                this.compoundSrcRect.translate(delta.x, delta.y);
	            }
	        },
	        // setAutoexposeHelper:(helper) {
	        // 	DragEditPartsTracker.superclass.setAutoexposeHelper.call(this.helper);
	        // 	if (helper != null && sourceRelativeStartPoint == null
	        // 			&& isInDragInProgress()) {
	        // 		IFigure figure = ((GraphicalEditPart) getSourceEditPart())
	        // 				.getFigure();
	        // 		sourceRelativeStartPoint = new PrecisionPoint(getStartLocation());
	        // 		figure.translateToRelative(sourceRelativeStartPoint);
	        // 	}
	        // }
	        setCloneActive: function(cloneActive) {
	            if (this.cloneActive == cloneActive) {
	                return;
	            }
	            this.eraseSourceFeedback();
	            this.eraseTargetFeedback();
	            this.cloneActive = cloneActive;
	        },
	        setTargetEditPart: function(editpart) {
	            if (this.getTargetEditPart() == editpart) {
	                return;
	            }
	            DragEditPartsTracker.superclass.setTargetEditPart.call(this, editpart);
	        },
	        showSourceFeedback: function() {
	            var editParts = this.getOperationSet();
	            editParts.forEach(function(editPart) {
	                editPart.showSourceFeedback(this.getTargetRequest());
	            }.bind(this));
	            this.setFlag(DragEditPartsTracker.FLAG_SOURCE_FEEDBACK, true);
	        },
	        setState: function(state) {
	            var check = this.isInState(AbstractTool.STATE_INITIAL);
	            DragEditPartsTracker.superclass.setState.call(this, state);
	            if (this.isInState(AbstractTool.STATE_ACCESSIBLE_DRAG | AbstractTool.STATE_DRAG_IN_PROGRESS | AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS)) {
	                if (this.getCurrentInput().isModKeyDown(DragEditPartsTracker.MODIFIER_CLONE)) {
	                    this.setCloneActive(true);
	                    this.handleDragInProgress();
	                }
	            }
	            if (check && this.isInState(AbstractTool.STATE_DRAG | AbstractTool.STATE_ACCESSIBLE_DRAG | AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS)) {
	                this.captureSourceDimensions();
	            }
	        },
	        updateTargetRequest: function() {
	            this.repairStartLocation();
	            var request = this.getTargetRequest();
	            request.setEditParts(this.getOperationSet());
	            var delta = this.getDragMoveDelta();


	            request.setConstrainedMove(this.getCurrentInput().isModKeyDown(
	                DragEditPartsTracker.MODIFIER_CONSTRAINED_MOVE));
	            request.setSnapToEnabled(!this.getCurrentInput().isModKeyDown(
	                DragEditPartsTracker.MODIFIER_NO_SNAPPING));

	            // if (this.getCurrentInput().isShiftKeyDown()) {
	            // request.setConstrainedMove(true);
	            if (request.isConstrainedMove()) {
	                var ratio = 0;
	                if (delta.width != 0) {
	                    ratio = Number(delta.height) / Number(delta.width);
	                }
	                ratio = Math.abs(ratio);
	                if (ratio > 0.5 && ratio < 1.5) {
	                    if (Math.abs(delta.height) > Math.abs(delta.width)) {
	                        if (delta.height > 0) {
	                            delta.height = Math.abs(delta.width);
	                        } else {
	                            delta.height = -Math.abs(delta.width);
	                        }
	                    } else {
	                        if (delta.width > 0) {
	                            delta.width = Math.abs(delta.height);
	                        } else {
	                            delta.width = -Math.abs(delta.height);
	                        }
	                    }
	                } else {
	                    if (Math.abs(delta.width) > Math.abs(delta.height)) {
	                        delta.height = 0;
	                    } else {
	                        delta.width = 0;
	                    }
	                }
	            }
	            // else{
	            //   request.setConstrainedMove(false);
	            // }

	            var moveDelta = new Point(delta.width, delta.height);
	            request.getExtendedData().clear();
	            request.setMoveDelta(moveDelta);

	            this.snapPoint(request);

	            request.setLocation(this.getLocation());
	            request.setType(this.getCommandName());
	        },
	        snapPoint: function(request) {
	            //暂未实现
	        }
	    });

	    return DragEditPartsTracker;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 161 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-13
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(147),
	    __webpack_require__(146),
	    __webpack_require__(129),
	    __webpack_require__(151),
	    __webpack_require__(127),
	    __webpack_require__(140)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    AbstractTool,
	    TargetingTool,
	    EditPart,
	    SelectionRequest,
	    KeyStroke,
	    RequestConstants
	) {
	    'use strict';

	    var SelectEditPartTracker = function(owner) {
	        SelectEditPartTracker.superclass.constructor.call(this);
	        this.editpart = null;
	        this.setSourceEditPart(owner);
	    };

	    //static properties
	    SelectEditPartTracker.FLAG_SELECTION_PERFORMED = TargetingTool.MAX_FLAG << 1;
	    SelectEditPartTracker.FLAG_ENABLE_DIRECT_EDIT = TargetingTool.MAX_FLAG << 2;
	    SelectEditPartTracker.MAX_FLAG = SelectEditPartTracker.FLAG_ENABLE_DIRECT_EDIT;

	    util.defineClass(SelectEditPartTracker, TargetingTool, {
	        calculateCursor: function() {
	            if (this.isInState(AbstractTool.STATE_INITIAL | AbstractTool.STATE_DRAG | AbstractTool.STATE_ACCESSIBLE_DRAG)) {
	                return this.getDefaultCursor();
	            }
	            return SelectEditPartTracker.superclass.calculateCursor.call(this);
	        },
	        getCommandName: function() {
	            return "Select Tracker"; //$NON-NLS-1$
	        },
	        getDebugName: function() {
	            return "Select Tracker"; //$NON-NLS-1$
	        },
	        getSourceEditPart: function() {
	            return this.editpart;
	        },
	        handleButtonDown: function(button, part) {
	            if ((button == 3 || button == 1) && this.isInState(AbstractTool.STATE_INITIAL)) {
	                this.performConditionalSelection();
	            }
	            if (button != 1) {
	                this.setState(AbstractTool.STATE_INVALID);
	                if (button == 3) {
	                    this.setState(AbstractTool.STATE_TERMINAL);
	                }
	                this.handleInvalidInput(part);
	            } else {
	                this.stateTransition(AbstractTool.STATE_INITIAL, AbstractTool.STATE_DRAG);
	            }
	            return true;
	        },
	        handleButtonUp: function(button, part) {
	            if (this.isInState(AbstractTool.STATE_DRAG)) {
	                this.performSelection();
	                if (this.getFlag(SelectEditPartTracker.FLAG_ENABLE_DIRECT_EDIT)) {
	                    this.performDirectEdit();
	                }
	                if (button == 1 && this.getSourceEditPart().getSelected() != EditPart.SELECTED_NONE) {
	                    this.getCurrentViewer().reveal(this.getSourceEditPart() /*, FreeformConstants.REVEAL_SPACE*/ );
	                }
	                this.setState(AbstractTool.STATE_TERMINAL);
	                return true;
	            }
	            return false;
	        },
	        handleDoubleClick: function(button, part) {
	            this.setFlag(SelectEditPartTracker.FLAG_ENABLE_DIRECT_EDIT, false);
	            if (button == 1) {
	                this.setFlag(SelectEditPartTracker.FLAG_SELECTION_PERFORMED, true);
	                this.performOpen();
	            }
	            return true;
	        },
	        handleDragStarted: function(part) {
	            return this.stateTransition(AbstractTool.STATE_DRAG, AbstractTool.STATE_DRAG_IN_PROGRESS);
	        },
	        hasSelectionOccurred: function() {
	            return this.getFlag(SelectEditPartTracker.FLAG_SELECTION_PERFORMED);
	        },
	        performConditionalSelection: function() {
	            if (this.getSourceEditPart().getSelected() == EditPart.SELECTED_NONE) {
	                this.performSelection();
	            } else if (this.getCurrentInput().getModifiers() == 0) {
	                this.setFlag(SelectEditPartTracker.FLAG_ENABLE_DIRECT_EDIT, true);
	            }
	        },
	        performDirectEdit: function() {
	            //TODO
	            // throw 'not supported.';
	        },
	        performOpen: function() {
	            var request = new SelectionRequest();
	            request.setLocation(this.getLocation());
	            request.setModifiers(this.getCurrentInput().getModifiers());
	            request.setType(RequestConstants.REQ_OPEN);
	            this.getSourceEditPart().performRequest(request);
	        },
	        performSelection: function() {
	            if (this.hasSelectionOccurred()) {
	                return;
	            }
	            this.setFlag(SelectEditPartTracker.FLAG_SELECTION_PERFORMED, true);
	            var viewer = this.getCurrentViewer();
	            var selectedObjects = viewer.getSelectedEditParts();
	            if (this.getCurrentInput().isModKeyDown(KeyStroke.CTRL)) {
	                if (util.Array.contains(selectedObjects, this.getSourceEditPart())) {
	                    viewer.deselect(this.getSourceEditPart());
	                } else {
	                    viewer.appendSelection(this.getSourceEditPart());
	                }
	            } else if (this.getCurrentInput().isShiftKeyDown()) {
	                viewer.appendSelection(this.getSourceEditPart());
	            } else {
	                viewer.select(this.getSourceEditPart());
	            }
	        },
	        resetFlags: function() {
	            SelectEditPartTracker.superclass.resetFlags.call(this);
	            this.setFlag(SelectEditPartTracker.FLAG_SELECTION_PERFORMED, false);
	            this.setFlag(SelectEditPartTracker.FLAG_ENABLE_DIRECT_EDIT, false);
	        },
	        setSourceEditPart: function(part) {
	            this.editpart = part;
	        }
	    });

	    return SelectEditPartTracker;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));


/***/ },
/* 162 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(163),
	    __webpack_require__(9),
	    __webpack_require__(10)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, GroupRequest, Point, Dimension) {
	    'use strict';

	    var ChangeBoundsRequest = function(type) {
	        ChangeBoundsRequest.superclass.constructor.call(this, type);

	        this.moveDelta = new Point();
	        this.resizeDelta = new Dimension();
	        this.resizeDirection = null;
	        this.mouseLocation = null;
	        this.flags = 0;
	    };

	    // var Point = Point;
	    // var Dimension = Dimension;

	    //static properties

	    ChangeBoundsRequest.CONSTRAINED_RESIZE = 1;
	    ChangeBoundsRequest.CENTERED_RESIZE = 2;
	    ChangeBoundsRequest.CONSTRAINED_MOVE = 4;
	    ChangeBoundsRequest.SNAP_TO = 16;

	    util.defineClass(ChangeBoundsRequest, GroupRequest, {
	        getLocation: function() {
	            return this.mouseLocation;
	        },
	        getMouseLocation: function() {
	            return this.getLocation();
	        },
	        getMoveDelta: function() {
	            return this.moveDelta;
	        },
	        getResizeDirection: function() {
	            return this.resizeDirection;
	        },
	        getSizeDelta: function() {
	            return this.resizeDelta;
	        },
	        getTransformedRectangle: function(rect) {
	            return rect.getCopy().translate(this.moveDelta.x, this.moveDelta.y).resize(this.resizeDelta.width, this.resizeDelta.height);
	        },
	        isCenteredResize: function() {
	            return (this.flags & ChangeBoundsRequest.CENTERED_RESIZE) != 0;
	        },
	        isConstrainedMove: function() {
	            return (this.flags & ChangeBoundsRequest.CONSTRAINED_MOVE) != 0;
	        },
	        isConstrainedResize: function() {
	            return (this.flags & ChangeBoundsRequest.CONSTRAINED_RESIZE) == ChangeBoundsRequest.CONSTRAINED_RESIZE;
	        },
	        setCenteredResize: function(value) {
	            this.flags = value ? (this.flags | ChangeBoundsRequest.CENTERED_RESIZE) : (this.flags & ~ChangeBoundsRequest.CENTERED_RESIZE);
	        },
	        setConstrainedMove: function(value) {
	            this.flags = value ? (this.flags | ChangeBoundsRequest.CONSTRAINED_MOVE) : (this.flags & ~ChangeBoundsRequest.CONSTRAINED_MOVE);
	        },
	        setConstrainedResize: function(value) {
	            this.flags = value ? (this.flags | ChangeBoundsRequest.CONSTRAINED_RESIZE) : (this.flags & ~ChangeBoundsRequest.CONSTRAINED_RESIZE);
	        },
	        setMoveDelta: function(p) {
	            this.moveDelta = p;
	        },
	        setResizeDirection: function(dir) {
	            this.resizeDirection = dir;
	        },
	        setMouseLocation: function(p) {
	            this.setLocation(p);
	        },
	        setLocation: function(p) {
	            this.mouseLocation = p;
	        },
	        setSizeDelta: function(d) {
	            this.resizeDelta = d;
	        },
	        setSnapToEnabled: function(value) {
	            this.flags = value ? (this.flags | ChangeBoundsRequest.SNAP_TO) : (this.flags & ~ChangeBoundsRequest.SNAP_TO);
	        }
	    });

	    return ChangeBoundsRequest;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 163 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(141)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Request) {
	    'use strict';

	    var GroupRequest = function(type) {
	        GroupRequest.superclass.constructor.call(this, type);
	        this.parts = null;
	    };
	    //static properties

	    util.defineClass(GroupRequest, Request, {
	        getEditParts: function() {
	            return this.parts;
	        },
	        setEditParts: function(l) {
	            if (l instanceof Array) {
	                this.parts = l;
	            } else {
	                this.parts = [l];
	            }

	        },
	        setEditPart: function(part) {
	            this.parts = [part];
	        }
	    });

	    return GroupRequest;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 164 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(134)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, EditPartViewer) {
	    'use strict';

	    //ToolUtilities
	    var ToolUtilities = {};

	    ToolUtilities.getSelectionWithoutDependants = function(arg) {
	        var selectedParts = null;
	        var result = [];
	        if (arg == null) {
	            return;
	        }
	        if (util.isInstanceOf(arg, EditPartViewer)) {
	            selectedParts = arg.getSelection();
	        } else if (arg.length > 0) {
	            selectedParts = arg;
	        } else {
	            return result;
	        }
	        for (var i = 0; i < selectedParts.length; i++) {
	            var editpart = selectedParts[i];
	            if (!this.isAncestorContainedIn(selectedParts, editpart)) {
	                result.push(editpart);
	            }
	        }
	        return result;
	    };

	    ToolUtilities.filterEditPartsUnderstanding = function(list, request) {
	        for (var i = 0; i < list.length; i++) {
	            var ep = list[i];
	            if (!ep.understandsRequest(request)) {
	                list.splice(i, 1);
	                i--;
	            }
	        }
	    };
	    ToolUtilities.isAncestorContainedIn = function(c, ep) {
	        ep = ep.getParent();
	        while (ep != null) {
	            if (util.Array.contains(c, ep)) {
	                return true;
	            }
	            ep = ep.getParent();
	        }
	        return false;
	    };
	    ToolUtilities.findCommonAncestor = function(ll, rr) {
	        if (ll == rr) {
	            return ll;
	        }
	        var leftAncestors = [];
	        var rightAncestors = [];

	        var l = ll;
	        var r = rr;

	        while (l != null) {
	            leftAncestors.push(l);
	            l = l.getParent();
	        }

	        while (r != null) {
	            rightAncestors.push(r);
	            r = r.getParent();
	        }

	        var il = leftAncestors.length - 1;
	        var ir = rightAncestors.length - 1;
	        do {
	            if (leftAncestors[il] != rightAncestors[ir]) {
	                break;
	            }
	            il--;
	            ir--;
	        } while (il >= 0 && ir >= 0);

	        return leftAncestors[il + 1];
	    };

	    return ToolUtilities;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 165 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-16
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(12),
	    __webpack_require__(73),
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Rectangle, FreeformLayer) {
	    'use strict';

	    var FreeformFeedbackLayer = function(id) {
	        FreeformFeedbackLayer.superclass.constructor.call(this);
	        // var rect = new RectangleFigure();
	        // rect.setBackgroundColor(new Color(10,200,10)); //Color
	        // rect.setOpaque(true);
	        // this.add(rect,new Rectangle(10,10,50,50));
	        this.setEnabled(false);
	    };

	    util.defineClass(FreeformFeedbackLayer, FreeformLayer, {}); //FreeformLayer

	    return FreeformFeedbackLayer;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 166 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-23
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(130),
	    __webpack_require__(167),
	    __webpack_require__(131),
	    __webpack_require__(65),
	    __webpack_require__(66),
	    __webpack_require__(10),
	    __webpack_require__(67),
	    __webpack_require__(74),
	    __webpack_require__(115),
	    __webpack_require__(157),
	    __webpack_require__(69),
	    __webpack_require__(12)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    LayerConstants,
	    FeedbackLayer,
	    LayerManager,
	    Layer,
	    LayeredPane,
	    Dimension,
	    StackLayout,
	    ConnectionLayer,
	    Viewport,
	    SimpleRootEditPart,
	    ScalableLayeredPane,
	    Rectangle
	) {
	    'use strict';

	    var ScalableRootEditPart = function() {
	        ScalableRootEditPart.superclass.constructor.call(this);
	        this.innerLayers = null;
	        this.printableLayers = null;
	        this.scaledLayers = null;
	        // this.gridListener = {propertyChange: function (evt) {
	        //
	        // }};
	    };

	    util.defineClass(ScalableRootEditPart, SimpleRootEditPart, {
	        createFigure: function() {
	            var viewport = this.createViewport();
	            this.innerLayers = new LayeredPane(); //LayeredPane
	            this.createLayers(this.innerLayers);
	            viewport.setContents(this.innerLayers);
	            return viewport;
	        },
	        createGridLayer: function() {
	            return new COM.gef.GridLayer(); //COM.gef.GridLayer
	        },
	        createLayers: function(layeredPane) {
	            layeredPane.add(this.getScaledLayers(), LayerConstants.SCALABLE_LAYERS); //LayerConstants.SCALABLE_LAYERS
	            layeredPane.add((function() {
	                var l = new Layer();
	                l.getPreferredSize = function(wHint, hHint) {
	                    return new Dimension();
	                };
	                return l;
	            })(), LayerConstants.HANDLE_LAYER);
	            layeredPane.add(new FeedbackLayer(), LayerConstants.FEEDBACK_LAYER);
	            // layeredPane.add(new GuideLayer(), LayerConstants.GUIDE_LAYER);
	        },
	        createPrintableLayers: function() {
	            var pane = new LayeredPane(); //LayeredPane
	            var layer = new Layer(); //Layer
	            layer.setLayoutManager(new StackLayout()); //StackLayout
	            pane.add(layer, LayerConstants.PRIMARY_LAYER);
	            layer = new ConnectionLayer(); //ConnectionLayer
	            layer.setPreferredSize(new Dimension(5, 5)); //Dimension
	            pane.add(layer, LayerConstants.CONNECTION_LAYER);

	            return pane;
	        },
	        createScaledLayers: function() {
	            function FeedbackLayer() {
	                FeedbackLayer.superclass.constructor.call(this);
	                this.setEnabled(false);
	            }
	            util.defineClass(FeedbackLayer, Layer, {
	                getPreferredSize: function(wHint, hHint) {
	                    var rect = new Rectangle();
	                    var children = this.getChildren();
	                    for (var i = 0; i < children.length; i++) {
	                        rect.union(children[i].getBounds());
	                    }
	                    return rect.getSize();
	                }
	            });
	            var layers = new ScalableLayeredPane(); //ScalableLayeredPane
	            // layers.add(this.createGridLayer(), LayerConstants.GRID_LAYER);      //LayerConstants.GRID_LAYER
	            layers.add(this.getPrintableLayers(), LayerConstants.PRINTABLE_LAYERS); //LayerConstants.PRINTABLE_LAYERS
	            layers.add(new FeedbackLayer(), LayerConstants.SCALED_FEEDBACK_LAYER); //FeedbackLayer  LayerConstants.SCALED_FEEDBACK_LAYER
	            return layers;
	        },
	        createViewport: function() {
	            return new Viewport(true); //Viewport
	        },
	        getContentPane: function() {
	            return this.getLayer(LayerConstants.PRIMARY_LAYER); //LayerConstants.PRIMARY_LAYER
	        },
	        getDragTracker: function(req) {
	            return new COM.draw2d.MarqueeDragTracker(); //MarqueeDragTracker
	        },
	        getLayer: function(key) {
	            if (this.innerLayers == null) {
	                return null;
	            }
	            var layer = this.scaledLayers.getLayer(key);
	            if (layer != null) {
	                return layer;
	            }
	            layer = this.printableLayers.getLayer(key);
	            if (layer != null) {
	                return layer;
	            }
	            return this.innerLayers.getLayer(key);
	        },
	        getModel: function() {
	            return LayerManager.ID; //LayerManager
	        },
	        getPrintableLayers: function() {
	            if (this.printableLayers == null) {
	                this.printableLayers = this.createPrintableLayers();
	            }
	            return this.printableLayers;
	        },
	        getScaledLayers: function() {
	            if (this.scaledLayers == null) {
	                this.scaledLayers = this.createScaledLayers();
	            }
	            return this.scaledLayers;
	        },
	        getZoomManager: function() {
	            return this.zoomManager;
	        },
	        refreshGridLayer: function() {
	            //TODO
	        },
	        register: function() {
	            ScalableRootEditPart.superclass.register.call(this);
	            // this.getViewer().setProperty('ZoomManager', this.getZoomManager());
	            if (this.getLayer(LayerConstants.GRID_LAYER) != null) { //LayerConstants.GRID_LAYER
	                this.getViewer().addPropertyChangeListener(this.gridListener);
	                this.refreshGridLayer();
	            }
	        },
	        unregister: function() {
	            this.getViewer().removePropertyChangeListener(this.gridListener);
	            ScalableRootEditPart.superclass.unregister.call(this);
	            // this.getViewer().setProperty('ZoomManager', null);
	        }
	    });

	    return ScalableRootEditPart;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 167 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-16
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(12),
	    __webpack_require__(65)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Rectangle, Layer) {
	    'use strict';

	    var FeedbackLayer = function(type) {

	        FeedbackLayer.superclass.constructor.call(this);
	        this.setEnabled(false);
	    };

	    util.defineClass(FeedbackLayer, Layer, {
	        getPreferredSize: function(wHint, hHint) {
	            var rect = new Rectangle();
	            for (var i = 0; i < this.getChildren().length; i++)
	                rect.union((this.getChildren()[i]).getBounds());
	            return rect.getSize();
	        }
	    });

	    return FeedbackLayer;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 168 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-26
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(132),
	    __webpack_require__(169),
	    __webpack_require__(191),
	    __webpack_require__(158),
	    __webpack_require__(192)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    EditPolicy,
	    XYLayoutEditPolicy,
	    CancelSelectionTracker,
	    AbstractGraphicalEditPart,
	    UnlimitedFreeformFigure
	) {
	    'use strict';

	    var UnlimitedFreeformEditPart = function() {
	        UnlimitedFreeformEditPart.superclass.constructor.call(this);

	    };

	    //static properties
	    util.defineClass(UnlimitedFreeformEditPart, AbstractGraphicalEditPart, {
	        createFigure: function() {
	            var figure = new UnlimitedFreeformFigure(this.id, this.getViewer().background);
	            return figure;
	        },
	        createEditPolicies: function() {
	            this.installEditPolicy(EditPolicy.LAYOUT_ROLE, new XYLayoutEditPolicy());
	        },
	        getDragTracker: function(request) {
	            return new CancelSelectionTracker(this);
	        }
	    });

	    return UnlimitedFreeformEditPart;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 169 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(170),
	    __webpack_require__(162),
	    __webpack_require__(12),
	    __webpack_require__(10),
	    __webpack_require__(9)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, ConstrainedLayoutEditPolicy, ChangeBoundsRequest, Rectangle, Dimension, Point) {
	    'use strict';

	    var XYLayoutEditPolicy = function() {
	        XYLayoutEditPolicy.superclass.constructor.call(this);

	    };

	    //static properties

	    XYLayoutEditPolicy.PREFERRED_SIZE = new Dimension(-1, -1);


	    util.defineClass(XYLayoutEditPolicy, ConstrainedLayoutEditPolicy, {
	        getConstraintForChangeBoundsRect: function(request, child, rect) {
	            if (util.isInstanceOf(request, ChangeBoundsRequest)) {
	                if (request.getSizeDelta().width == 0 &&
	                    (request.getSizeDelta().height == 0)) {
	                    if (this.getCurrentConstraintFor(child) != null) {
	                        // Bug 86473 allows for unintended use of this method
	                        rect.setSize(this.getCurrentConstraintFor(child).getSize());
	                    }
	                } else {
	                    // for backwards compatibility, ensure minimum size is respected
	                    rect.setSize(Dimension.max(this.getMinimumSizeFor(child),
	                        rect.getSize()));
	                }
	            }
	            return XYLayoutEditPolicy.superclass.getConstraintForChangeBoundsRect.call(this, request, child, rect);
	        },
	        getConstraintForPoint: function(p) {
	            return new Rectangle(p, XYLayoutEditPolicy.PREFERRED_SIZE);
	        },
	        getConstraintForRectangle: function(r) {
	            return new Rectangle(r);
	        },
	        getCurrentConstraintFor: function(child) {
	            var fig = child.getFigure();
	            return fig.getParent().getLayoutManager().getConstraint(fig);
	        },
	        getLayoutOrigin: function() {
	            return this.getXYLayout().getOrigin(this.getLayoutContainer());
	        },
	        getXYLayout: function() {
	            if (this.xyLayout == null) {
	                var container = this.getLayoutContainer();
	                this.xyLayout = container.getLayoutManager();
	            }
	            return this.xyLayout;
	        },
	        setXyLayout: function(xyLayout) {
	            this.xyLayout = xyLayout;
	        },
	        showSizeOnDropFeedback: function(request) {
	            var p = new Point(request.getLocation().getCopy());
	            var size = request.getSize().getCopy();
	            var feedbackBounds = new Rectangle(p, size);
	            var feedback = this.getSizeOnDropFeedback(request);
	            feedback.translateToRelative(feedbackBounds);
	            feedback.setBounds(feedbackBounds
	                .expand(this.getCreationFeedbackOffset(request)));
	            feedback.validate();
	        },
	        getMinimumSizeFor: function(child) {
	            return new Dimension(8, 8);
	        }


	    });

	    return XYLayoutEditPolicy;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 170 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(171),
	    __webpack_require__(135),
	    __webpack_require__(140),
	    __webpack_require__(174),
	    __webpack_require__(12),
	    __webpack_require__(10)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    LayoutEditPolicy,
	    Command,
	    RequestConstants,
	    ResizableEditPolicy,
	    Rectangle,
	    Dimension
	) {
	    'use strict';

	    var ConstrainedLayoutEditPolicy = function() {
	        ConstrainedLayoutEditPolicy.superclass.constructor.call(this);

	    };


	    // var Dimension = Dimension;
	    // var Rectangle = Rectangle;

	    ConstrainedLayoutEditPolicy.UNSPECIFIED_SIZE = new Dimension();

	    //static properties
	    util.defineClass(ConstrainedLayoutEditPolicy, LayoutEditPolicy, {
	        createAddCommand: Function.emptyFunction,
	        createChangeConstraintCommand: Function.emptyFunction,
	        createChildEditPolicy: function(child) {
	            return new ResizableEditPolicy();
	        },
	        getAddCommand: function(request) {
	            var editParts = request.getEditParts();
	            var command = new Command.CompoundCommand();
	            command.setDebugLabel("Add in ConstrainedLayoutEditPolicy"); //$NON-NLS-1$
	            var child;

	            for (var i = 0; i < editParts.length; i++) {
	                child = editParts[i];
	                command.add(this.createAddCommand(
	                    request,
	                    child,
	                    this.translateToModelConstraint(this.getConstraintFor(request, child))));
	            }
	            return command.unwrap();
	        },
	        getAlignChildrenCommand: function(request) {
	            return this.getResizeChildrenCommand(request);
	        },
	        getCommand: function(request) {
	            if (RequestConstants.REQ_RESIZE_CHILDREN == (request.getType())) {
	                return this.getResizeChildrenCommand(request);
	            }
	            if (RequestConstants.REQ_ALIGN_CHILDREN == (request.getType())) {
	                return this.getAlignChildrenCommand(request);
	            }

	            return ConstrainedLayoutEditPolicy.superclass.getCommand.call(this, request);
	        },
	        getConstraintForChangeBounds: function(request, child) {
	            var locationAndSize = new Rectangle(child.getFigure().getBounds());
	            child.getFigure().translateToAbsolute(locationAndSize);
	            locationAndSize = request.getTransformedRectangle(locationAndSize);
	            this.translateFromAbsoluteToLayoutRelative(locationAndSize);
	            return this.getConstraintForChangeBoundsRect(request, child, locationAndSize);
	        },
	        getConstraintForChangeBoundsRect: function(request, child, rectangle) {
	            if (ConstrainedLayoutEditPolicy.UNSPECIFIED_SIZE == (rectangle.getSize())) {
	                return this.getConstraintFor(rectangle.getLocation());
	            }
	            return this.getConstraintForRectangle(rectangle);
	        },
	        getConstraintForPoint: Function.needOverride,
	        getConstraintForRectangle: Function.needOverride,
	        getConstraintForCreate: function(request) {
	            var locationAndSize = null;
	            if (request.getSize() == null || request.getSize().isEmpty()) {
	                locationAndSize = new Rectangle(request.getLocation(),
	                    ConstrainedLayoutEditPolicy.UNSPECIFIED_SIZE);
	            } else {
	                locationAndSize = new Rectangle(request.getLocation(),
	                    request.getSize());
	            }
	            this.translateFromAbsoluteToLayoutRelative(locationAndSize);
	            return this.getConstraintForChangeBoundsRect(request, null, locationAndSize);
	        },
	        getConstraintForClone: function(part, request) {
	            return this.getConstraintForChangeBounds(request, part);
	        },
	        translateToModelConstraint: function(figureConstraint) {
	            return figureConstraint;
	        },
	        getResizeChildrenCommand: function(request) {
	            return this.getChangeConstraintCommand(request);
	        },
	        getChangeConstraintCommand: function(request) {
	            var resize = new Command.CompoundCommand();
	            var c;
	            var child;
	            var children = request.getEditParts();

	            for (var i = 0; i < children.length; i++) {
	                child = children[i];
	                c = this.createChangeConstraintCommand(
	                    request,
	                    child,
	                    this.translateToModelConstraint(this.getConstraintForChangeBounds(request, child)));
	                resize.add(c);
	            }
	            return resize.unwrap();
	        },
	        getMoveChildrenCommand: function(request) {
	            // By default, move and resize are treated the same for constrained
	            // layouts.
	            return this.getResizeChildrenCommand(request);
	        }

	    });

	    return ConstrainedLayoutEditPolicy;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 171 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(172),
	    __webpack_require__(132),
	    __webpack_require__(152),
	    __webpack_require__(140),
	    __webpack_require__(53),
	    __webpack_require__(13),
	    __webpack_require__(19),
	    __webpack_require__(22)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    GraphicalEditPolicy,
	    EditPolicy,
	    EditPartListener,
	    RequestConstants,
	    RectangleFigure,
	    Insets,
	    FigureUtilities,
	    ColorConstants
	) {
	    'use strict';

	    var LayoutEditPolicy = function() {
	        LayoutEditPolicy.superclass.constructor.call(this);

	        this.sizeOnDropFeedback = null;
	        this.feedbackListener = null;
	    };

	    //static properties
	    util.defineClass(LayoutEditPolicy, GraphicalEditPolicy, {
	        activate: function() {
	            this.setListener(this.createListener());
	            this.decorateChildren();
	            LayoutEditPolicy.superclass.activate.call(this);
	        },

	        createChildEditPolicy: Function.needOverride,

	        createListener() {

	            var l = new EditPartListener.Stub();
	            l.childAdded = function(child, index) {
	                this.decorateChild(child);
	            }.bind(this);

	            return l;
	        },
	        createSizeOnDropFeedback: Function.emptyFunction,
	        deactivate: function() {
	            if (this.sizeOnDropFeedback != null) {
	                this.removeFeedback(this.sizeOnDropFeedback);
	                this.sizeOnDropFeedback = null;
	            }
	            this.setListener(null);
	            LayoutEditPolicy.superclass.deactivate.call(this);
	        },
	        decorateChild: function(child) {
	            var policy = this.createChildEditPolicy(child);
	            child.installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, policy);
	        },
	        decorateChildren: function() {
	            var children = this.getHost().getChildren();
	            for (var i = 0; i < children.length; i++) {
	                this.decorateChild(children[i]);
	            }
	        },
	        eraseLayoutTargetFeedback: Function.emptyFunction,
	        eraseSizeOnDropFeedback: function(request) {
	            if (this.sizeOnDropFeedback != null) {
	                this.removeFeedback(this.sizeOnDropFeedback);
	                this.sizeOnDropFeedback = null;
	            }
	        },
	        eraseTargetFeedback(request) {

	            if (RequestConstants.REQ_ADD == (request.getType()) ||
	                RequestConstants.REQ_MOVE == (request.getType()) ||
	                RequestConstants.REQ_RESIZE_CHILDREN == (request.getType()) ||
	                RequestConstants.REQ_CREATE == (request.getType()) ||
	                RequestConstants.REQ_CLONE == (request.getType())) {
	                this.eraseLayoutTargetFeedback(request);
	            }

	            if (RequestConstants.REQ_CREATE == (request.getType())) {
	                this.eraseSizeOnDropFeedback(request);
	            }
	        },
	        getAddCommand: Function.emptyFunction,
	        getCloneCommand: Function.emptyFunction,
	        getCommand: function(request) {
	            if (RequestConstants.REQ_DELETE_DEPENDANT == (request.getType()))
	                return this.getDeleteDependantCommand(request);

	            if (RequestConstants.REQ_ADD == (request.getType()))
	                return this.getAddCommand(request);

	            if (RequestConstants.REQ_ORPHAN_CHILDREN == (request.getType()))
	                return this.getOrphanChildrenCommand(request);

	            if (RequestConstants.REQ_MOVE_CHILDREN == (request.getType()))
	                return this.getMoveChildrenCommand(request);

	            if (RequestConstants.REQ_CLONE == (request.getType()))
	                return this.getCloneCommand(request);

	            if (RequestConstants.REQ_CREATE == (request.getType()))
	                return this.getCreateCommand(request);

	            return null;
	        },
	        getCreateCommand: Function.needOverride,
	        getCreationFeedbackOffset: function() {
	            return new Insets();
	        },
	        getDeleteDependantCommand: Function.emptyFunction,
	        getLayoutContainer: function() {
	            return this.getHost().getContentPane();
	        },
	        getMoveChildrenCommand: Function.needOverride,
	        getOrphanChildrenCommand: Function.emptyFunction,
	        getSizeOnDropFeedback: function(createRequest) {
	            if (this.sizeOnDropFeedback == null) {
	                this.sizeOnDropFeedback = this.createSizeOnDropFeedback(createRequest);
	            }

	            return this.getSizeOnDropFeedback();
	        },
	        getSizeOnDropFeedback: function() {
	            if (this.sizeOnDropFeedback == null) {
	                this.sizeOnDropFeedback = new RectangleFigure();
	                FigureUtilities.makeGhostShape(this.sizeOnDropFeedback);
	                // this.sizeOnDropFeedback.setLineStyle(Graphics.LINE_DASHDOT);
	                this.sizeOnDropFeedback.setForegroundColor(ColorConstants.white);
	                this.addFeedback(this.sizeOnDropFeedback);
	            }
	            return this.sizeOnDropFeedback;
	        },
	        getTargetEditPart(request) {
	            if (RequestConstants.REQ_ADD == (request.getType()) ||
	                RequestConstants.REQ_MOVE == (request.getType()) ||
	                RequestConstants.REQ_CREATE == (request.getType()) ||
	                RequestConstants.REQ_CLONE == (request.getType()))
	                return this.getHost();
	            return null;
	        },
	        setListener(listener) {
	            if (this.listener != null) {
	                this.getHost().removeEditPartListener(this.listener);
	            }
	            this.listener = listener;
	            if (this.listener != null) {
	                this.getHost().addEditPartListener(this.listener);
	            }
	        },
	        showLayoutTargetFeedback: Function.emptyFunction,
	        showSizeOnDropFeedback: Function.emptyFunction,
	        showTargetFeedback: function(request) {
	            if (RequestConstants.REQ_ADD == (request.getType()) ||
	                RequestConstants.REQ_CLONE == (request.getType()) ||
	                RequestConstants.REQ_MOVE == (request.getType()) ||
	                RequestConstants.REQ_RESIZE_CHILDREN == (request.getType()) ||
	                RequestConstants.REQ_CREATE == (request.getType())) {
	                this.showLayoutTargetFeedback(request);
	            }

	            if (RequestConstants.REQ_CREATE == (request.getType())) {
	                var createReq = request;
	                if (createReq.getSize() != null) {
	                    this.showSizeOnDropFeedback(createReq);
	                }
	            }
	        },
	        undecorateChild: function(child) {
	            child.removeEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
	        },
	        undecorateChildren: function() {
	            var children = this.getHost().getChildren();
	            for (var i = 0; i < children.length; i++) {
	                this.undecorateChild(children[i]);
	            }
	        },
	        getLayoutOrigin: function() {
	            return this.getLayoutContainer().getClientArea().getLocation();
	        },
	        translateFromAbsoluteToLayoutRelative: function(t) {
	            var figure = this.getLayoutContainer();
	            figure.translateToRelative(t);
	            figure.translateFromParent(t);
	            var negatedLayoutOrigin = this.getLayoutOrigin().getNegated();
	            t.performTranslate(negatedLayoutOrigin.x, negatedLayoutOrigin.y);
	        },
	        translateFromLayoutRelativeToAbsolute: function(t) {
	            var figure = this.getLayoutContainer();
	            var layoutOrigin = this.getLayoutOrigin();
	            t.performTranslate(layoutOrigin.x, layoutOrigin.y);
	            figure.translateToParent(t);
	            figure.translateToAbsolute(t);
	        }

	    });

	    return LayoutEditPolicy;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 172 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-5-13
	 * @abstract
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(131),
	    __webpack_require__(173),
	    __webpack_require__(130)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, LayerManager, AbstractEditPolicy, LayerConstants) {
	    'use strict';

	    var GraphicalEditPolicy = function() {
	        GraphicalEditPolicy.superclass.constructor.call(this);
	    };

	    util.defineClass(GraphicalEditPolicy, AbstractEditPolicy, {
	        addFeedback: function(figure) {
	            this.getFeedbackLayer().add(figure);
	        },
	        getFeedbackLayer: function() {
	            return this.getLayer(LayerConstants.FEEDBACK_LAYER);
	        },
	        getHostFigure: function() {
	            return this.getHost().getFigure();
	        },
	        getLayer: function(layer) {
	            return LayerManager.Helper.find(this.getHost()).getLayer(layer);
	        },
	        removeFeedback: function(figure) {
	            this.getFeedbackLayer().remove(figure);
	        }

	    });

	    return GraphicalEditPolicy;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 173 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-5-13
	 * @abstract
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(132)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, EditPolicy) {
	    'use strict';

	    var AbstractEditPolicy = function() {

	        AbstractEditPolicy.superclass.constructor.call(this);
	        this.host = null;
	    };

	    util.defineClass(AbstractEditPolicy, EditPolicy, {
	        activate: Function.emptyFunction,
	        deactivate: Function.emptyFunction,
	        eraseSourceFeedback: Function.emptyFunction,
	        eraseTargetFeedback: Function.emptyFunction,
	        getCommand: Function.emptyFunction,
	        getHost: function() {
	            return this.host;
	        },
	        getTargetEditPart: Function.emptyFunction,
	        setHost: function(host) {
	            this.host = host;
	        },
	        showSourceFeedback: Function.emptyFunction,
	        showTargetFeedback: Function.emptyFunction,
	        understandsRequest: Function.emptyFunction
	    });

	    return AbstractEditPolicy;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 174 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-27
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(11),
	    __webpack_require__(175),
	    __webpack_require__(178),
	    __webpack_require__(182),
	    __webpack_require__(140),
	    __webpack_require__(162),
	    __webpack_require__(111)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    PositionConstants,
	    NonResizableEditPolicy,
	    ResizableHandleKit,
	    ResizeTracker,
	    RequestConstants,
	    ChangeBoundsRequest,
	    Cursor
	) {
	    'use strict';

	    var ResizableEditPolicy = function() {
	        ResizableEditPolicy.superclass.constructor.call(this);
	        this.resizeDirections = PositionConstants.NSEW;
	    };

	    //static properties
	    util.defineClass(ResizableEditPolicy, NonResizableEditPolicy, {
	        createSelectionHandles: function() {
	            if (this.resizeDirections == PositionConstants.NONE) {
	                // non resizable, so delegate to super implementation
	                return ResizableEditPolicy.superclass.createSelectionHandles.call(this);
	            }

	            // resizable in at least one direction
	            var list = [];
	            this.createMoveHandle(list);
	            this.createResizeHandle(list, PositionConstants.NORTH);
	            this.createResizeHandle(list, PositionConstants.EAST);
	            this.createResizeHandle(list, PositionConstants.SOUTH);
	            this.createResizeHandle(list, PositionConstants.WEST);
	            this.createResizeHandle(list, PositionConstants.SOUTH_EAST);
	            this.createResizeHandle(list, PositionConstants.SOUTH_WEST);
	            this.createResizeHandle(list, PositionConstants.NORTH_WEST);
	            this.createResizeHandle(list, PositionConstants.NORTH_EAST);
	            return list;
	        },
	        createResizeHandle: function(handles, direction) {
	            if ((this.resizeDirections & direction) == direction) {
	                ResizableHandleKit.addHandle(this.getHost(),
	                    handles, direction, this.getResizeTracker(direction), Cursor
	                    .getDirectionalCursor(direction, this.getHostFigure()
	                        .isMirrored()));
	            } else {
	                // display 'resize' handle to allow dragging or indicate selection
	                // only
	                this.createDragHandle(handles, direction);
	            }
	        },
	        getResizeTracker: function(direction) {
	            return new ResizeTracker(this.getHost(), direction);
	        },
	        eraseSourceFeedback: function(request) {
	            if (RequestConstants.REQ_RESIZE == (request.getType()))
	                this.eraseChangeBoundsFeedback(request);
	            else
	                ResizableEditPolicy.superclass.eraseSourceFeedback.call(this, request);
	        },
	        getCommand: function(request) {
	            if (RequestConstants.REQ_RESIZE == (request.getType())) {
	                return this.getResizeCommand(request);
	            }
	            return ResizableEditPolicy.superclass.getCommand.call(this, request);
	        },
	        getResizeCommand: function(request) {
	            var req = new ChangeBoundsRequest(RequestConstants.REQ_RESIZE_CHILDREN);
	            req.setEditParts(this.getHost());

	            req.setMoveDelta(request.getMoveDelta());
	            req.setSizeDelta(request.getSizeDelta());
	            req.setLocation(request.getLocation());
	            req.setExtendedData(request.getExtendedData());
	            req.setResizeDirection(request.getResizeDirection());
	            return this.getHost().getParent().getCommand(req);
	        },
	        setResizeDirections: function(newDirections) {
	            this.resizeDirections = newDirections;
	        },
	        showSourceFeedback: function(request) {
	            if (RequestConstants.REQ_RESIZE == (request.getType())) {
	                this.showChangeBoundsFeedback(request);
	            } else {
	                ResizableEditPolicy.superclass.showSourceFeedback.call(this, request);
	            }
	        },
	        understandsRequest: function(request) {
	            if (RequestConstants.REQ_RESIZE == (request.getType())) {
	                // check all resize directions of the request are supported
	                var resizeDirections = request.getResizeDirection();
	                return (resizeDirections & this.getResizeDirections()) == resizeDirections;
	            }
	            return ResizableEditPolicy.superclass.understandsRequest.call(this, request);
	        },
	        getResizeDirections: function() {
	            return this.resizeDirections;
	        }
	    });

	    return ResizableEditPolicy;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 175 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-26
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(11),
	    __webpack_require__(177),
	    __webpack_require__(22),
	    __webpack_require__(178),
	    __webpack_require__(140),
	    __webpack_require__(186),
	    __webpack_require__(162),
	    __webpack_require__(176),
	    __webpack_require__(12),
	    __webpack_require__(39),
	    __webpack_require__(187),
	    __webpack_require__(160),
	    __webpack_require__(189),
	    __webpack_require__(161),
	    __webpack_require__(190),
	    __webpack_require__(81)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    PositionConstants,
	    RectangleFeedback,
	    ColorConstants,
	    ResizableHandleKit,
	    RequestConstants,
	    AlignmentRequest,
	    ChangeBoundsRequest,
	    AbstractHandle,
	    Rectangle,
	    FocusBorder,
	    SelectionHandlesEditPolicy,
	    DragEditPartsTracker,
	    NonResizableHandleKit,
	    SelectEditPartTracker,
	    HandleBounds,
	    AbstractLocator
	) {
	    'use strict';

	    var NonResizableEditPolicy = function() {
	        NonResizableEditPolicy.superclass.constructor.call(this);
	        this._isDragAllowed = true;
	    };

	    //移到NonResixableEditPolicy.js里，因為只有這個模塊用到
	    var SharedCursors = {
	        CURSOR_TREE_ADD: ''
	    };

	    //static properties
	    util.defineClass(NonResizableEditPolicy, SelectionHandlesEditPolicy, {
	        createDragSourceFeedbackFigure: function() {
	            // Use a ghost rectangle for feedback
	            // var r = new RectangleFigure();
	            var r = new RectangleFeedback();
	            // FigureUtilities.makeGhostShape(r);
	            // r.setLineStyle(Graphics.LINE_DOT);
	            r.setForegroundColor(ColorConstants.white);
	            r.setBounds(this.getInitialFeedbackBounds());
	            r.validate();
	            this.addFeedback(r);
	            return r;
	        },
	        createSelectionHandles: function() {
	            var list = [];
	            this.createMoveHandle(list);
	            this.createDragHandle(list, PositionConstants.NORTH_EAST);
	            this.createDragHandle(list, PositionConstants.NORTH_WEST);
	            this.createDragHandle(list, PositionConstants.SOUTH_EAST);
	            this.createDragHandle(list, PositionConstants.SOUTH_WEST);
	            return list;
	        },
	        createDragHandle: function(handles, direction) {
	            if (this.isDragAllowed()) {
	                // display 'resize' handles to allow dragging (drag tracker)
	                NonResizableHandleKit
	                    .addHandle(this.getHost(), handles,
	                        direction, this.getDragTracker(), SharedCursors.SIZEALL);
	            } else {
	                // display 'resize' handles to indicate selection only (selection
	                // tracker)
	                NonResizableHandleKit
	                    .addHandle(this.getHost(), handles,
	                        direction, this.getSelectTracker(), SharedCursors.ARROW);
	            }
	        },
	        getSelectTracker: function() {
	            return new SelectEditPartTracker(this.getHost());
	        },
	        getDragTracker: function() {
	            return new DragEditPartsTracker(this.getHost());
	        },
	        createMoveHandle: function(handles) {
	            if (this.isDragAllowed()) {
	                // display 'move' handle to allow dragging
	                ResizableHandleKit.addMoveHandle(this.getHost(),
	                    handles, this.getDragTracker(), SharedCursors.SIZEALL);
	            } else {
	                // display 'move' handle only to indicate selection
	                ResizableHandleKit.addMoveHandle(this.getHost(),
	                    handles, this.getSelectTracker(), SharedCursors.ARROW);
	            }
	        },
	        deactivate: function() {
	            if (this.feedback != null) {
	                this.removeFeedback(this.feedback);
	                this.feedback = null;
	            }
	            this.hideFocus();
	            NonResizableEditPolicy.superclass.deactivate.call(this);
	        },
	        eraseChangeBoundsFeedback: function(request) {
	            if (this.feedback != null) {
	                this.removeFeedback(this.feedback);
	            }
	            this.feedback = null;
	        },
	        eraseSourceFeedback: function(request) {
	            if ((RequestConstants.REQ_MOVE == (request.getType()) && this.isDragAllowed()) ||
	                RequestConstants.REQ_CLONE == (request.getType()) ||
	                RequestConstants.REQ_ADD == (request.getType()))
	                this.eraseChangeBoundsFeedback(request);
	        },
	        getCommand: function(request) {
	            var type = request.getType();
	            if (RequestConstants.REQ_MOVE == (type) && this.isDragAllowed())
	                return this.getMoveCommand(request);
	            if (RequestConstants.REQ_ORPHAN == (type))
	                return this.getOrphanCommand(request);
	            if (RequestConstants.REQ_ALIGN == (type))
	                return this.getAlignCommand(request);

	            return null;
	        },
	        getDragSourceFeedbackFigure: function() {
	            if (this.feedback == null)
	                this.feedback = this.createDragSourceFeedbackFigure();
	            return this.feedback;
	        },
	        getAlignCommand: function(request) {
	            var req = new AlignmentRequest(RequestConstants.REQ_ALIGN_CHILDREN);
	            req.setEditParts(this.getHost());
	            req.setAlignment(request.getAlignment());
	            req.setAlignmentRectangle(request.getAlignmentRectangle());
	            return this.getHost().getParent().getCommand(req);
	        },
	        getInitialFeedbackBounds: function() {
	            // if  (Util.isInstanceOf(this.getHost().getFigure(), HandleBounds)){
	            //   return this.getHost().getFigure().getHandleBounds();
	            // }
	            return this.getHost().getFigure().getBounds();
	        },
	        getMoveCommand(request) {
	            var req = new ChangeBoundsRequest(RequestConstants.REQ_MOVE_CHILDREN);
	            req.setEditPart(this.getHost());

	            req.setMoveDelta(request.getMoveDelta());
	            req.setSizeDelta(request.getSizeDelta());
	            req.setLocation(request.getLocation());
	            req.setExtendedData(request.getExtendedData());
	            return this.getHost().getParent().getCommand(req);
	        },
	        getOrphanCommand: Function.emptyFunction,
	        hideFocus: function() {
	            if (this.focusRect != null)
	                this.removeFeedback(this.focusRect);
	            this.focusRect = null;
	        },
	        isDragAllowed: function() {
	            return this._isDragAllowed;
	        },
	        setDragAllowed: function(isDragAllowed) {
	            if (isDragAllowed == this._isDragAllowed)
	                return;
	            this._isDragAllowed = isDragAllowed;
	        },
	        showChangeBoundsFeedback: function(request) {
	            var feedback = this.getDragSourceFeedbackFigure();

	            var rect = new Rectangle(
	                this.getInitialFeedbackBounds().getCopy());
	            this.getHostFigure().translateToAbsolute(rect);
	            rect.translate(request.getMoveDelta());
	            rect.resize(request.getSizeDelta());

	            feedback.translateToRelative(rect);
	            feedback.setBounds(rect);
	            feedback.validate();
	        },
	        showFocus: function() {
	            var locator = new AbstractLocator();
	            locator.relocate = function(target) {
	                var figure = this.getHostFigure();
	                var r;
	                if (util.isInstanceOf(figure, HandleBounds))
	                    r = figure.getHandleBounds().getCopy();
	                else
	                    r = this.getHostFigure().getBounds().getResized(-1, -1);
	                this.getHostFigure().translateToAbsolute(r);
	                target.translateToRelative(r);
	                target.setBounds(r.expand(5, 5).resize(1, 1));
	            };

	            var focusRect = new AbstractHandle(this.getHost(), locator);
	            focusRect.setBorder(new FocusBorder());
	            focusRect.createDragTracker = Function.emptyFunction;

	            this.addFeedback(focusRect);
	        },
	        showSourceFeedback: function(request) {
	            if ((RequestConstants.REQ_MOVE == (request.getType()) && this.isDragAllowed()) ||
	                RequestConstants.REQ_ADD == (request.getType()) ||
	                RequestConstants.REQ_CLONE == (request.getType()))
	                this.showChangeBoundsFeedback(request);
	        },
	        understandsRequest(request) {
	            if (RequestConstants.REQ_MOVE == (request.getType()))
	                return this.isDragAllowed();
	            else if (RequestConstants.REQ_CLONE == (request.getType()) ||
	                RequestConstants.REQ_ADD == (request.getType()) ||
	                RequestConstants.REQ_ORPHAN == (request.getType()) ||
	                RequestConstants.REQ_ALIGN == (request.getType()))
	                return true;
	            return NonResizableEditPolicy.superclass.understandsRequest.call(this, request);
	        }

	    });

	    return NonResizableEditPolicy;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 176 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-5-13
	 * @abstract
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(25)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Figure) {
	    'use strict';

	    var AbstractHandle = function(owner, locator, cursor) {
	        AbstractHandle.superclass.constructor.call(this);
	        this.isHandle = true;
	        this.editpart = null;
	        this.dragTracker = null;
	        this.locator = null;
	        this.setOwner(owner);
	        this.setLocator(locator);
	        this.setCursor(cursor);
	    };

	    util.defineClass(AbstractHandle, Figure, {
	        addNotify: function() {
	            AbstractHandle.superclass.addNotify.call(this);
	            this.getOwnerFigure().addAncestorListener(this);
	        },
	        ancestorMoved: function(ancestor) {
	            this.revalidate();
	        },
	        ancestorAdded: Function.emptyFunction,
	        ancestorRemoved: Function.emptyFunction,
	        createDragTracker: Function.emptyFunction,

	        getAccessibleLocation: function() {
	            var p = this.etBounds().getCenter();
	            this.translateToAbsolute(p);
	            return p;
	        },
	        getDragTracker: function() {
	            if (this.dragTracker == null) {
	                this.dragTracker = this.createDragTracker();
	            }
	            return this.dragTracker;
	        },
	        getLocator: function() {
	            return this.locator;
	        },
	        getOwner: function() {
	            return this.editpart;
	        },
	        getOwnerFigure: function() {
	            return this.getOwner().getFigure();
	        },
	        removeNotify: function() {
	            this.getOwnerFigure().removeAncestorListener(this);
	            AbstractHandle.superclass.removeAncestorListener.call(this);
	        },
	        setDragTracker: function(dragTracker) {
	            this.dragTracker = dragTracker;
	        },
	        setLocator: function(locator) {
	            this.locator = locator;
	        },
	        setOwner: function(editpart) {
	            this.editpart = editpart;
	        },
	        validate: function() {
	            if (this.isValid()) {
	                return;
	            }
	            this.getLocator().relocate(this);
	            AbstractHandle.superclass.validate.call(this);
	        }

	    });

	    return AbstractHandle;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 177 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(22),
	    __webpack_require__(21),
	    __webpack_require__(53),
	    __webpack_require__(20),
	    __webpack_require__(12)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, ColorConstants, Color, RectangleFigure, Graphics, Rectangle) {
	    'use strict';

	    var RectangleFeedback = function() {
	        RectangleFeedback.superclass.constructor.call(this);
	        this.setOutlineColor(RectangleFeedback.DEFAULT_OUTLINE_COLOR);
	        this.setFillColor(RectangleFeedback.DEFAULT_FILL_COLOR);

	    };

	    // var RectangleFigure = RectangleFigure;
	    // var Color = Color;
	    // var ColorConstants = ColorConstants;

	    //static properties

	    RectangleFeedback.CACHE_SIZE = 1;
	    RectangleFeedback.DEFAULT_FILL_COLOR = new Color(
	        ColorConstants.blue.red,
	        ColorConstants.blue.green,
	        ColorConstants.blue.blue,
	        0.4);
	    RectangleFeedback.DEFAULT_OUTLINE_COLOR = ColorConstants.blue;

	    util.defineClass(RectangleFeedback, RectangleFigure, {
	        paint: function(graphics) {
	            var bounds = this.getBounds();
	            if (this.figureCanvas == null) {
	                this.figureCanvas = document.createElement("canvas");
	                this.figureCanvas.width = RectangleFeedback.CACHE_SIZE;
	                this.figureCanvas.height = RectangleFeedback.CACHE_SIZE;

	                var g = new Graphics(this.figureCanvas
	                    .getContext("2d"), new Rectangle(0, 0,
	                        RectangleFeedback.CACHE_SIZE,
	                        RectangleFeedback.CACHE_SIZE));

	                if (this.fill) {
	                    g.setFillColor(this.fillColor);
	                    g.fillRect(0, 0, RectangleFeedback.CACHE_SIZE,
	                        RectangleFeedback.CACHE_SIZE);
	                }
	            }
	            graphics.drawImage(this.figureCanvas, bounds.x, bounds.y,
	                bounds.width, bounds.height);
	            if (this.outline) {
	                this.paintOutline(graphics, bounds.x, bounds.y,
	                    bounds.width, bounds.height);
	            }
	        },
	        paintOutline: function(graphics, x, y, w, h) {
	            graphics.setLineAttributes(this.lineAttributes);
	            graphics.strokeRect(x, y, w, h);
	        }

	    });

	    return RectangleFeedback;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 178 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(11),
	    __webpack_require__(179),
	    __webpack_require__(184)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, PositionConstants, ResizeHandle, MoveHandle) {
	    'use strict';

	    if (ResizableHandleKit) {
	        return;
	    }
	    var ResizableHandleKit = {};

	    ResizableHandleKit.addHandle = function(part, handles, direction, tracker, cursor) {
	        handles.push(ResizableHandleKit.createHandle(part, direction, tracker, cursor));
	    };
	    ResizableHandleKit.addHandles = function(part, handles) {
	        ResizableHandleKit.addMoveHandle(part, handles);
	        handles.push(ResizableHandleKit.createHandle(part, PositionConstants.EAST));
	        handles.push(ResizableHandleKit.createHandle(part, PositionConstants.SOUTH_EAST));
	        handles.push(ResizableHandleKit.createHandle(part, PositionConstants.SOUTH));
	        handles.push(ResizableHandleKit.createHandle(part, PositionConstants.SOUTH_WEST));
	        handles.push(ResizableHandleKit.createHandle(part, PositionConstants.WEST));
	        handles.push(ResizableHandleKit.createHandle(part, PositionConstants.NORTH_WEST));
	        handles.push(ResizableHandleKit.createHandle(part, PositionConstants.NORTH));
	        handles.push(ResizableHandleKit.createHandle(part, PositionConstants.NORTH_EAST));
	    };
	    ResizableHandleKit.addMoveHandle = function(f, handles, tracker, cursor) {
	        handles.push(ResizableHandleKit.moveHandle(f, tracker, cursor));
	    };
	    ResizableHandleKit.createHandle = function(owner, direction, tracker, cursor) {
	        var handle = new ResizeHandle(owner, direction);
	        handle.setDragTracker(tracker);
	        return handle;
	    };
	    ResizableHandleKit.moveHandle = function(owner, tracker, cursor) {
	        var handle = new MoveHandle(owner);
	        handle.setDragTracker(tracker);
	        return handle;
	    };

	    return ResizableHandleKit;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 179 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(180),
	    __webpack_require__(181),
	    __webpack_require__(182),
	    __webpack_require__(111)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, SquareHandle, RelativeHandleLocator, ResizeTracker, Cursor) {
	    'use strict';

	    var ResizeHandle = function(owner, direction) {
	        ResizeHandle.superclass.constructor.call(this, owner, new RelativeHandleLocator(owner.getFigure(), direction));
	        this.setCursor(Cursor.getDirectionalCursor(direction, owner.getFigure().isMirrored()));
	        this.cursorDirection = direction;
	    };

	    //static properties

	    util.defineClass(ResizeHandle, SquareHandle, {
	        createDragTracker: function() {
	            return new ResizeTracker(this.getOwner(), this.cursorDirection);
	        }
	    });

	    return ResizeHandle;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 180 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(129),
	    __webpack_require__(176),
	    __webpack_require__(22),
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, EditPart, AbstractHandle, ColorConstants) {
	    'use strict';

	    var SquareHandle = function(owner, loc) {
	        SquareHandle.superclass.constructor.call(this, owner, loc);
	        this.setPreferredSize(SquareHandle.DEFAULT_HANDLE_SIZE, SquareHandle.DEFAULT_HANDLE_SIZE);

	    };

	    SquareHandle.DEFAULT_HANDLE_SIZE = 7;

	    //static properties
	    util.defineClass(SquareHandle, AbstractHandle, {
	        getBorderColor: function() {
	            return (this.isPrimary()) ? ColorConstants.white : ColorConstants.black;
	        },
	        getFillColor: function() {
	            return (this.isPrimary()) ? ColorConstants.black : ColorConstants.white;
	        },
	        isPrimary: function() {
	            return this.getOwner().getSelected() == EditPart.SELECTED_PRIMARY;
	        },
	        paintFigure: function(g) {
	            var r = this.getBounds().getCopy();
	            r.shrink(1, 1);
	            g.setFillColor(this.getFillColor());
	            g.fillRect(r.x, r.y, r.width, r.height);

	            if (!(util.browser.ie && util.browser.version == "10.0")) {
	                g.setStrokeColor(this.getBorderColor());
	                g.strokeRect(r.x, r.y, r.width, r.height);
	                r.expand(1, 1);
	            }
	        }

	    });

	    return SquareHandle;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 181 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(86)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, RelativeLocator) {
	    'use strict';

	    var RelativeHandleLocator = function(ref, location) {
	        RelativeHandleLocator.superclass.constructor.call(this, ref, location);

	    };
	    // var HandleBounds = COM.gef.HandleBounds;

	    // var RelativeLocator = RelativeLocator;


	    //static properties

	    util.defineClass(RelativeHandleLocator, RelativeLocator, {
	        getReferenceBox() {
	            // var f = this.getReferenceFigure();
	            // if (util.isInstanceOf(f, HandleBounds)){
	            //   return f.getHandleBounds();
	            // }
	            return RelativeHandleLocator.superclass.getReferenceBox.call(this);
	        }
	    });

	    return RelativeHandleLocator;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 182 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-13
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(183),
	    __webpack_require__(127),
	    __webpack_require__(164),
	    __webpack_require__(162),
	    __webpack_require__(140),
	    __webpack_require__(135),
	    __webpack_require__(147),
	    __webpack_require__(9),
	    __webpack_require__(10),
	    __webpack_require__(11),
	    __webpack_require__(25),
	    __webpack_require__(12),
	    __webpack_require__(111)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    SimpleDragTracker,
	    KeyStroke,
	    ToolUtilities,
	    ChangeBoundsRequest,
	    RequestConstants,
	    Command,
	    AbstractTool,
	    Point,
	    Dimension,
	    PositionConstants,
	    Figure,
	    Rectangle,
	    Cursor
	) {
	    'use strict';

	    var ResizeTracker = function(owner, direction) {
	        ResizeTracker.superclass.constructor.call(this);

	        this.direction = direction;
	        this.owner = owner;
	        this.sourceRect = null;
	        // this.snapToHelper = null;
	        this.setDisabledCursor(Cursor.NO);
	        this.minDimension = Figure.MIN_DIMENSION;
	        this.maxDimension = Figure.MAX_DIMENSION;
	    };


	    //static properties

	    ResizeTracker.FLAG_TARGET_FEEDBACK = SimpleDragTracker.MAX_FLAG << 1;
	    ResizeTracker.MAX_FLAG = ResizeTracker.FLAG_TARGET_FEEDBACK;

	    util.defineClass(ResizeTracker, SimpleDragTracker, {
	        activate: function() {
	            ResizeTracker.superclass.activate.call(this);
	            if (this.owner != null) {
	                //					if (this.getTargetEditPart() != null){
	                //						this.snapToHelper = (SnapToHelper)getTargetEditPart().getAdapter(SnapToHelper.class);
	                //					}
	                var figure = this.owner.getFigure();
	                this.sourceRect = figure.getBounds().getCopy();
	                figure.translateToAbsolute(this.sourceRect);
	            }
	        },
	        commitDrag: function() {
	            this.eraseTargetFeedback();
	            ResizeTracker.superclass.commitDrag.call(this);
	        },
	        createOperationSet: function() {
	            var list = ResizeTracker.superclass.createOperationSet.call(this);
	            ToolUtilities.filterEditPartsUnderstanding(list, this.getSourceRequest());
	            return list;
	        },
	        createSourceRequest: function() {
	            var request = new ChangeBoundsRequest(RequestConstants.REQ_RESIZE);
	            request.setResizeDirection(this.getResizeDirection());
	            return request;
	        },
	        deactivate: function() {
	            this.eraseTargetFeedback();
	            this.sourceRect = null;
	            //this.snapToHelper = null;
	            ResizeTracker.superclass.deactivate.call(this);
	        },
	        eraseTargetFeedback: function() {
	            if (!this.getFlag(ResizeTracker.FLAG_TARGET_FEEDBACK)) {
	                return;
	            }
	            if (this.getTargetEditPart() != null) {
	                this.getTargetEditPart().eraseTargetFeedback(this.getSourceRequest());
	            }
	            this.setFlag(ResizeTracker.FLAG_TARGET_FEEDBACK, false);
	        },
	        getCommand: function() {
	            var editparts = this.getOperationSet();
	            var part;
	            var command = new Command.CompoundCommand();

	            editparts.forEach(function(part) {
	                command.add(part.getCommand(this.getSourceRequest()));
	            }.bind(this));

	            return command.unwrap();
	        },
	        getCommandName: function() {
	            return RequestConstants.REQ_RESIZE;
	        },
	        getDefaultCursor: function() {
	            return Cursor.getDirectionalCursor(this.direction, this.getTargetEditPart().getFigure().isMirrored());
	        },
	        getResizeDirection: function() {
	            return this.direction;
	        },
	        getOwner: function() {
	            return this.owner;
	        },
	        getTargetEditPart: function() {
	            if (this.owner != null) {
	                return this.owner.getParent();
	            }
	            return null;
	        },
	        handleButtonUp: function(button) {
	            if (this.stateTransition(AbstractTool.STATE_DRAG_IN_PROGRESS, AbstractTool.STATE_TERMINAL)) {
	                this.eraseSourceFeedback();
	                this.eraseTargetFeedback();
	                this.performDrag();
	            }
	            return true;
	        },
	        handleDragInProgress: function(part) {
	            if (this.isInDragInProgress()) {
	                this.updateSourceRequest();
	                this.showSourceFeedback();
	                this.showTargetFeedback();
	                this.setCurrentCommand(this.getCommand());
	            }
	            return true;
	        },
	        showTargetFeedback: function() {
	            this.setFlag(ResizeTracker.FLAG_TARGET_FEEDBACK, true);
	            if (this.getTargetEditPart() != null) {
	                this.getTargetEditPart().showTargetFeedback(this.getSourceRequest());
	            }
	        },
	        updateSourceRequest: function() {
	            var request = this.getSourceRequest();
	            var d = this.getDragMoveDelta();
	            var location = this.getLocation().getCopy();
	            var moveDelta = new Point(0, 0);
	            var resizeDelta = new Dimension(0, 0);
	            if (this.getCurrentInput().isShiftKeyDown() && this.owner != null) {
	                request.setConstrainedResize(true);
	                var origHeight = this.owner.getFigure().getHeight();
	                var origWidth = this.owner.getFigure().getWidth();
	                var ratio = 1;
	                if (origWidth != 0 && origHeight != 0) {
	                    ratio = origHeight / origWidth;
	                }
	                if (this.getResizeDirection() == PositionConstants.SOUTH_EAST) {
	                    if (d.height > (d.width * ratio)) {
	                        d.width = (d.height / ratio) >> 0;
	                    } else {
	                        d.height = (d.width * ratio) >> 0;
	                    }
	                } else if (this.getResizeDirection() == PositionConstants.NORTH_WEST) {
	                    if (d.height < (d.width * ratio)) {
	                        d.width = (d.height / ratio) >> 0;
	                    } else {
	                        d.height = (d.width * ratio) >> 0;
	                    }
	                } else if (this.getResizeDirection() == PositionConstants.NORTH_EAST) {
	                    if (-(d.height) > (d.width * ratio)) {
	                        d.width = -(d.height / ratio) >> 0;
	                    } else {
	                        d.height = -(d.width * ratio) >> 0;
	                    }
	                } else if (this.getResizeDirection() == PositionConstants.SOUTH_WEST) {
	                    if (-(d.height) < (d.width * ratio)) {
	                        d.width = -(d.height / ratio) >> 0;
	                    } else {
	                        d.height = -(d.width * ratio) >> 0;
	                    }
	                }
	            } else {
	                request.setConstrainedResize(false);
	            }

	            if ((this.getResizeDirection() & PositionConstants.NORTH) != 0) {
	                if (this.getCurrentInput().isControlKeyDown()) {
	                    resizeDelta.height -= d.height;
	                }
	                moveDelta.y += d.height;
	                resizeDelta.height -= d.height;
	            }
	            if ((this.getResizeDirection() & PositionConstants.SOUTH) != 0) {
	                if (this.getCurrentInput().isControlKeyDown()) {
	                    moveDelta.y -= d.height;
	                    resizeDelta.height += d.height;
	                }
	                resizeDelta.height += d.height;
	            }
	            if ((this.getResizeDirection() & PositionConstants.WEST) != 0) {
	                if (this.getCurrentInput().isControlKeyDown()) {
	                    resizeDelta.width -= d.width;
	                }
	                moveDelta.x += d.width;
	                resizeDelta.width -= d.width;
	            }
	            if ((this.getResizeDirection() & PositionConstants.EAST) != 0) {
	                if (this.getCurrentInput().isControlKeyDown()) {
	                    moveDelta.x -= d.width;
	                    resizeDelta.width += d.width;
	                }
	                resizeDelta.width += d.width;
	            }
	            request.setMoveDelta(moveDelta);
	            request.setSizeDelta(resizeDelta);
	            request.setLocation(location);
	            request.setEditParts(this.getOperationSet());
	            request.getExtendedData().clear();

	            if (!this.getCurrentInput().isAltKeyDown()) {
	                var rect = this.sourceRect.getCopy();
	                rect.translate(moveDelta.x, moveDelta.y);
	                rect.resize(resizeDelta.width, resizeDelta.height);
	                var result = new Rectangle();
	                if (request.isCenteredResize()) {
	                    if (result.x != 0.0) {
	                        result.width += -result.x;
	                    } else if (result.width != 0) {
	                        result.x = -result.width;
	                        result.width *= 2.0;
	                    }
	                    if (result.y != 0.0) {
	                        result.height += -result.y;
	                    } else if (result.height != 0.0) {
	                        result.y = -result.height;
	                        result.height *= 2.0;
	                    }
	                }
	                var preciseMove = new Point(result.x + moveDelta.x, result.y + moveDelta.y);
	                var preciseResize = new Dimension(result.width + resizeDelta.width, result.height + resizeDelta.height);

	                request.setMoveDelta(preciseMove);
	                request.setSizeDelta(preciseResize);
	            }
	            this.enforceConstraintsForResize(request);

	        },
	        enforceConstraintsForResize: function(changeBoundsRequest) {
	            if (this.owner != null) {
	                var size = this.getEnforeBaseSize();
	                var sizeDelta = changeBoundsRequest.getSizeDelta();
	                var newSizeDelta = new Dimension(sizeDelta.width, sizeDelta.height);
	                var minDimension = this.getMinimumSizeFor();

	                if (null != minDimension) {
	                    if (size.width + sizeDelta.width < minDimension.width) {
	                        newSizeDelta.width = minDimension.width - size.width;
	                    }
	                    if (size.height + sizeDelta.height < minDimension.height) {
	                        newSizeDelta.height = minDimension.height - size.height;
	                    }
	                }

	                changeBoundsRequest.setSizeDelta(newSizeDelta);

	                var moveDelta = changeBoundsRequest.getMoveDelta();
	                var newMoveDelta = new Point(moveDelta.x, moveDelta.y);

	                if (null != minDimension) {
	                    if (moveDelta.x + minDimension.width > size.width) {
	                        newMoveDelta.x = size.width - minDimension.width;
	                    }
	                    if (moveDelta.y + minDimension.height > size.height) {
	                        newMoveDelta.y = size.height - minDimension.height;
	                    }
	                }
	                changeBoundsRequest.setMoveDelta(newMoveDelta);
	                /*
	                size.width += sizeDelta.width;
	                size.height += sizeDelta.height;
	                size.width = Math.max(Figure.MIN_DIMENSION.width,size.width);
	                size.width = Math.min(Figure.MAX_DIMENSION.width,size.width);
	                size.height = Math.max(Figure.MIN_DIMENSION.height,size.height);
	                size.height = Math.min(Figure.MAX_DIMENSION.height,size.height);
	                console.log('resize: '+size.width+','+size.height);
	                var originSize = this.owner.getFigure().getBounds().getSize();
	                var newSizeDelta = new Dimension(size.width - originSize.width,size.height - originSize.height);
	                changeBoundsRequest.setSizeDelta(newSizeDelta);
	                */
	                /*
	                var originalConstraint = owner.getFigure().getBounds().getCopy();
	                this.owner.getFigure().translateToAbsolute(originalConstraint);

	                var manipulatedConstraint = changeBoundsRequest.getTransformedRectangle(originalConstraint);
	                this.owner.getFigure().translateToRelative(manipulatedConstraint);
	                manipulatedConstraint.setSize(Dimension.max(
	                    manipulatedConstraint.getSize(),
	                    this.getMinimumSizeFor(changeBoundsRequest)));
	                manipulatedConstraint.setSize(Dimension.min(
	                    manipulatedConstraint.getSize(),
	                    this.getMaximumSizeFor(changeBoundsRequest)));
	                this.owner.getFigure().translateToAbsolute(manipulatedConstraint);
	                var  newSizeDelta = manipulatedConstraint.getSize().getShrinked(originalConstraint.getSize());
	                changeBoundsRequest.setSizeDelta(newSizeDelta);
	                */
	            }
	        },
	        getEnforeBaseSize: function() {
	            return this.owner.getFigure().getBounds().getSize();
	        },
	        getMinimumSizeFor: function(request) {
	            return this.minDimension;
	        },
	        getMaximumSizeFor: function(request) {
	            return this.maxDimension;
	        },
	        setMinimumSizeFor: function(size) {
	            this.minDimension = size;
	        },
	        setMaximumSizeFor: function(size) {
	            return this.maxDimension = size;
	        }
	    });
	    return ResizeTracker;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 183 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2013-4-23
	 * @abstract
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(147),
	    __webpack_require__(141)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractTool, Request) {
	    'use strict';

	    var SimpleDragTracker = function() {

	        SimpleDragTracker.superclass.constructor.call(this);
	        this.sourceRequest = null;
	    };

	    util.defineClass(SimpleDragTracker, AbstractTool, {
	        calculateCursor: function() {
	            if (this.isInState(AbstractTool.STATE_INITIAL | AbstractTool.STATE_DRAG | AbstractTool.STATE_ACCESSIBLE_DRAG)) {
	                return this.getDefaultCursor();
	            }
	            return SimpleDragTracker.superclass.calculateCursor.call(this);
	        },
	        commitDrag: function() {
	            this.eraseSourceFeedback();
	            this.performDrag();
	            this.setState(AbstractTool.STATE_TERMINAL);
	        },
	        createSourceRequest: function() {
	            return new Request();
	        },
	        deactivate: function() {
	            this.eraseSourceFeedback();
	            this.sourceRequest = null;
	            SimpleDragTracker.superclass.deactivate.call(this);
	        },
	        eraseSourceFeedback: function() {
	            if (!this.isShowingFeedback()) {
	                return;
	            }
	            this.setFlag(SimpleDragTracker.FLAG_SOURCE_FEEDBACK, false);
	            var editParts = this.getOperationSet();
	            for (var i = 0; i < editParts.length; i++) {
	                var editPart = editParts[i];
	                editPart.eraseSourceFeedback(this.getSourceRequest());
	            }
	        },
	        getSourceRequest: function() {
	            if (this.sourceRequest == null) {
	                this.sourceRequest = this.createSourceRequest();
	            }
	            return this.sourceRequest;
	        },
	        handleButtonDown: function(button) {
	            if (button != 1) {
	                this.setState(AbstractTool.STATE_INVALID);
	                this.handleInvalidInput();
	            } else {
	                this.stateTransition(AbstractTool.STATE_INITIAL, AbstractTool.STATE_DRAG);
	            }
	            return true;
	        },
	        handleButtonUp: function(button) {
	            if (this.stateTransition(AbstractTool.STATE_DRAG_IN_PROGRESS, AbstractTool.STATE_TERMINAL)) {
	                this.eraseSourceFeedback();
	                this.performDrag();
	            }
	            return true;
	        },
	        handleDragInProgress: function() {

	            if (this.isInDragInProgress()) {
	                this.updateSourceRequest();
	                this.showSourceFeedback();
	                this.setCurrentCommand(this.getCommand());
	            }
	            return true;
	        },
	        handleDragStarted: function() {
	            return this.stateTransition(AbstractTool.STATE_DRAG, AbstractTool.STATE_DRAG_IN_PROGRESS);
	        },
	        handleInvalidInput: function() {
	            this.eraseSourceFeedback();
	            this.setCurrentCommand(null);
	            return true;
	        },
	        handleKeyDown: function(e) {
	            if (this.acceptArrowKey(e)) {
	                this.accStepIncrement();
	                if (this.stateTransition(AbstractTool.STATE_INITIAL, AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS)) {
	                    this.setStartLocation(this.getLocation());
	                }
	                // switch (e.keyCode) {
	                // case
	                // case
	                // case
	                // case
	                // }
	                return true;
	            }
	            return false;
	        },
	        handleKeyUp: function(e) {
	            if (this.acceptArrowKey(e)) {
	                this.accStepReset();
	                return true;
	            }
	            return false;
	        },
	        isShowingFeedback: function() {
	            return this.getFlag(SimpleDragTracker.FLAG_SOURCE_FEEDBACK);
	        },
	        performDrag: function() {
	            this.executeCurrentCommand();
	        },
	        showSourceFeedback: function() {
	            var editParts = this.getOperationSet();
	            for (var i = 0; i < editParts.length; i++) {
	                var editPart = editParts[i];
	                editPart.showSourceFeedback(this.getSourceRequest());
	            }
	            this.setFlag(SimpleDragTracker.FLAG_SOURCE_FEEDBACK, true);
	        },
	        updateSourceRequest: function() {
	            this.getSourceRequest().setType(this.getCommandName());
	        }
	    });
	    SimpleDragTracker.FLAG_SOURCE_FEEDBACK = AbstractTool.MAX_FLAG << 1;
	    SimpleDragTracker.MAX_FLAG = SimpleDragTracker.FLAG_SOURCE_FEEDBACK;

	    return SimpleDragTracker;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 184 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(185),
	    __webpack_require__(176),
	    __webpack_require__(160),
	    __webpack_require__(12),
	    __webpack_require__(40),
	    __webpack_require__(111)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, MoveHandleLocator, AbstractHandle, DragEditPartsTracker, Rectangle, LineBorder, Cursor) {
	    'use strict';

	    /**
	     * @author jiangqifan
	     * @since 2013-5-13
	     * @abstract
	     */
	    var MoveHandle = function(owner, locator) {
	        if (locator == null && owner != null) {
	            locator = new MoveHandleLocator(owner.getFigure());
	        }
	        MoveHandle.superclass.constructor.call(this, owner, locator);
	        this.innerPad = 2;
	        this.initialize();
	    };

	    MoveHandle.INNER_PAD = 2;

	    util.defineClass(MoveHandle, AbstractHandle, {
	        createDragTracker: function() {
	            var tracker = new DragEditPartsTracker(this.getOwner());
	            tracker.setDefaultCursor(this.getCursor());
	            return tracker;
	        },
	        containsPoint: function(x, y) {
	            if (!MoveHandle.superclass.containsPoint.call(this, x, y)) {
	                return false;
	            }

	            return !Rectangle.SINGLETON.setBounds(this.getBounds()).shrink(this.innerPad * 2, this.innerPad * 2).contains(x, y);
	        },
	        getInnerPad: function() {
	            return this.innerPad;
	        },
	        setInnerPad: function(innerPad) {
	            this.innerPad = innerPad;
	        },
	        getAccessibleLocation: function() {
	            var p = this.getBounds().getTopRight().translate(-1, this.getBounds().height / 4);
	            this.translateToAbsolute(p);
	            return p;
	        },
	        initialize: function() {
	            this.setOpaque(false);
	            this.setBorder(new LineBorder(this.innerPad));
	            this.setCursor(Cursor.MOVE);
	        }
	    });

	    return MoveHandle;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 185 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util) {
	    'use strict';

	    /**
	     * @author jiangqifan
	     * @since 2013-5-13
	     * @abstract
	     */
	    var MoveHandleLocator = function(reference) {
	        MoveHandleLocator.superclass.constructor.call(this);
	        this.setReference(reference);
	    };

	    util.defineClass(MoveHandleLocator, Object, {
	        getReference: function() {
	            return this.reference;
	        },
	        relocate: function(target) {
	            //TODO
	        },
	        setReference: function(follow) {
	            this.reference = follow;
	        }
	    });

	    return MoveHandleLocator;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 186 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(162),
	    __webpack_require__(11)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, ChangeBoundsRequest, PositionConstants) {
	    'use strict';

	    var AlignmentRequest = function(type) {
	        AlignmentRequest.superclass.constructor.call(this, type);
	        this._alignment = null;
	        this._alignmentRect = null;

	    };

	    util.defineClass(AlignmentRequest, ChangeBoundsRequest, {
	        doAlignment: function(result, reference) {
	            switch (this._alignment) {
	                case PositionConstants.LEFT:
	                    result.x = reference.x;
	                    break;
	                case PositionConstants.RIGHT:
	                    result.x = reference.x + reference.width - result.width;
	                    break;
	                case PositionConstants.TOP:
	                    result.y = reference.y;
	                    break;
	                case PositionConstants.BOTTOM:
	                    result.y = reference.y + reference.height - result.height;
	                    break;
	                case PositionConstants.CENTER:
	                    result.x = reference.x + (reference.width / 2) - (result.width / 2);
	                    break;
	                case PositionConstants.MIDDLE:
	                    result.y = reference.y + (reference.height / 2) - (result.height / 2);
	                    break;
	            }
	        },
	        getAlignment: function() {
	            return this._alignment;
	        },
	        getAlignmentRectangle: function() {
	            return this._alignmentRect;
	        },
	        getTransformedRectangle: function(rect) {
	            var result = rect.getCopy();
	            var reference = this.getAlignmentRectangle();
	            this.doAlignment(result, reference);
	            return result;
	        },
	        setAlignment: function(align) {
	            this._alignment = align;
	        },
	        setAlignmentRectangle: function(rect) {
	            this._alignmentRect = rect;
	        }
	    });

	    return AlignmentRequest;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 187 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(130),
	    __webpack_require__(188)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, LayerConstants, SelectionEditPolicy) {
	    'use strict';

	    var SelectionHandlesEditPolicy = function() {
	        SelectionHandlesEditPolicy.superclass.constructor.call(this);
	        this.handles = null;
	    };

	    //static properties
	    util.defineClass(SelectionHandlesEditPolicy, SelectionEditPolicy, {
	        addSelectionHandles: function() {
	            this.removeSelectionHandles();
	            var layer = this.getLayer(LayerConstants.HANDLE_LAYER);
	            this.handles = this.createSelectionHandles();
	            for (var i = 0; i < this.handles.length; i++)
	                layer.add(this.handles[i]);
	        },
	        createSelectionHandles: Function.needOverride,
	        hideSelection: function() {
	            this.removeSelectionHandles();
	        },
	        removeSelectionHandles: function() {
	            if (this.handles == null)
	                return;
	            var layer = this.getLayer(LayerConstants.HANDLE_LAYER);
	            for (var i = 0; i < this.handles.length; i++)
	                layer.remove(this.handles[i]);
	            this.handles = null;
	        },
	        showSelection: function() {
	            this.addSelectionHandles();
	        }

	    });

	    return SelectionHandlesEditPolicy;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 188 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(172),
	    __webpack_require__(152),
	    __webpack_require__(129),
	    __webpack_require__(140)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, GraphicalEditPolicy, EditPartListener, EditPart, RequestConstants) {
	    'use strict';

	    var SelectionEditPolicy = function() {
	        SelectionEditPolicy.superclass.constructor.call(this);

	        this.state = -1;
	        this.focus = false;
	        this.currentPart = null;
	        this.selectionListener = null;
	    };

	    //static properties
	    util.defineClass(SelectionEditPolicy, GraphicalEditPolicy, {
	        activate: function() {
	            SelectionEditPolicy.superclass.activate.call(this);
	            this.addSelectionListener();
	            this.setSelectedState(this.getHost().getSelected());
	            this.setFocus(this.getHost().hasFocus());
	        },
	        addSelectionListener() {
	            this.selectionListener = new EditPartListener.Stub();
	            this.selectionListener.selectedStateChanged = function(part) {
	                this.setSelectedState(part.getSelected());
	                this.setFocus(part.hasFocus());
	            }.bind(this);
	            this.getHost().addEditPartListener(this.selectionListener);
	        },
	        deactivate: function() {
	            this.removeSelectionListener();
	            this.setSelectedState(EditPart.SELECTED_NONE);
	            this.setFocus(false);
	            SelectionEditPolicy.superclass.deactivate.call(this);
	        },
	        getTargetEditPart: function(request) {
	            if (RequestConstants.REQ_SELECTION == (request.getType()))
	                return this.getHost();
	            return null;
	        },
	        hideFocus: Function.emptyFunction,
	        hideSelection: Function.needOverride,
	        removeSelectionListener: function() {
	            this.getHost().removeEditPartListener(this.selectionListener);
	        },
	        setFocus: function(value) {
	            if (this.focus == value)
	                return;
	            this.focus = value;
	            if (this.focus)
	                this.showFocus();
	            else
	                this.hideFocus();
	        },
	        setSelectedState: function(type) {
	            if (this.state == type)
	                return;
	            this.state = type;
	            if (type == EditPart.SELECTED_PRIMARY)
	                this.showPrimarySelection();
	            else if (type == EditPart.SELECTED)
	                this.showSelection();
	            else
	                this.hideSelection();
	        },
	        showFocus: Function.emptyFunction,
	        showPrimarySelection: function() {
	            this.showSelection();
	        },
	        showSelection: Function.needOverride

	    });

	    return SelectionEditPolicy;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 189 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(11),
	    __webpack_require__(179),
	    __webpack_require__(184)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, PositionConstants, ResizeHandle, MoveHandle) {
	    'use strict';

	    if (NonResizableHandleKit) {
	        return;
	    }

	    var NonResizableHandleKit = {};

	    NonResizableHandleKit.addCornerHandles = function(part, handles, tracker, cursor) {
	        handles.push(NonResizableHandleKit.createHandle(part, PositionConstants.SOUTH_EAST, tracker, cursor));
	        handles.push(NonResizableHandleKit.createHandle(part, PositionConstants.SOUTH_WEST, tracker, cursor));
	        handles.push(NonResizableHandleKit.createHandle(part, PositionConstants.NORTH_WEST, tracker, cursor));
	        handles.push(NonResizableHandleKit.createHandle(part, PositionConstants.NORTH_EAST, tracker, cursor));
	    };
	    NonResizableHandleKit.addHandle = function(part, handles, direction, tracker, cursor) {
	        handles.push(NonResizableHandleKit.createHandle(part, direction, tracker, cursor));
	    };
	    NonResizableHandleKit.addHandles = function(part, handles, tracker, cursor) {
	        NonResizableHandleKit.addMoveHandle(part, handles, tracker, cursor);
	        NonResizableHandleKit.addCornerHandles(part, handles, tracker, cursor);
	    };
	    NonResizableHandleKit.addMoveHandle = function(f, handles, tracker, cursor) {
	        handles.push(NonResizableHandleKit.moveHandle(f, tracker, cursor));
	    };
	    NonResizableHandleKit.createHandle = function(owner, direction, tracker, cursor) {
	        var handle = new ResizeHandle(owner, direction);
	        handle.setDragTracker(tracker);
	        handle.setCursor(cursor);
	        return handle;
	    };
	    NonResizableHandleKit.moveHandle = function(owner, tracker, cursor) {
	        var moveHandle = new MoveHandle(owner);
	        moveHandle.setDragTracker(tracker);
	        moveHandle.setCursor(cursor);
	        return moveHandle;
	    };

	    return NonResizableHandleKit;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 190 */
/***/ function(module, exports) {

	// /**
	//  * @author jiangqifan
	//  * @since 2016-5-25
	//  */
	//
	// (function(){
	//   COM.gef.HandleBounds = function(ref, location){
	//     ThisClass.superclass.constructor.call(this, ref, location);
	//
	//   }
	//
	//   var ThisClass = COM.gef.HandleBounds;
	//
	//   // var RelativeLocator = RelativeLocator;
	//
	//
	//   //static properties
	//
	//
	//   ThisClass.extend(RelativeLocator, {
	//     getReferenceBox() {
	//   		var f = this.getReferenceFigure();
	//   		if (Util.isInstanceOf(f, HandleBounds)){
	//         return f.getHandleBounds();
	//       }
	//   		return ThisClass.superclass.getReferenceBox.call(this);
	//   	}
	//   });
	//
	// })();


/***/ },
/* 191 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(161),
	    __webpack_require__(127)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, SelectEditPartTracker, KeyStroke) {
	    'use strict';

	    var CancelSelectionTracker = function(owner) {
	        CancelSelectionTracker.superclass.constructor.call(this, owner);

	    };


	    //static properties


	    util.defineClass(CancelSelectionTracker, SelectEditPartTracker, {
	        performSelection: function() {
	            if (this.hasSelectionOccurred()) {
	                return;
	            }
	            this.setFlag(SelectEditPartTracker.FLAG_SELECTION_PERFORMED, true);
	            var viewer = this.getCurrentViewer();
	            if (!this.getCurrentInput().isModKeyDown(KeyStroke.CTRL) && !this.getCurrentInput().isShiftKeyDown()) {
	                viewer.deselectAll();
	            }
	        }
	    });

	    return CancelSelectionTracker;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 192 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(71),
	    __webpack_require__(75),
	    __webpack_require__(183),
	    __webpack_require__(25)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, FreeformHelper, XYLayout, SimpleDragTracker, Figure) {
	    'use strict';

	    var UnlimitedFreeformFigure = function(gid) {
	        UnlimitedFreeformFigure.superclass.constructor.call(this, gid);
	        this._backgroundPadding = null;
	        this.helper = new FreeformHelper(this);
	        this.setLayoutManager(new XYLayout());
	    };

	    //static properties


	    util.defineClass(UnlimitedFreeformFigure, Figure, {
	        add: function(child, constraint, index) {
	            UnlimitedFreeformFigure.superclass.add.call(this, child, constraint, index);
	            this.helper.hookChild(child);
	        },
	        layout: function(c) {
	            UnlimitedFreeformFigure.superclass.layout.call(this, c);
	        },
	        /**
	         * 增加freeform监听器,用于监听freeform大小的变化
	         */
	        addFreeformListener: function(listener) {
	            this.addListener("FreeformListener", listener);
	        },
	        fireExtentChanged: function() {
	            var iter = this.getListeners("FreeformListener");
	            while (iter.hasNext()) {
	                iter.next().notifyFreeformExtentChanged();
	            }
	        },
	        fireMoved: function() {},
	        getFreeformExtent: function() {
	            return this.helper.getFreeformExtent();
	        },
	        primTranslate: function(dx, dy) {
	            this.bounds.x += dx;
	            this.bounds.y += dy;
	        },
	        remove: function(child) {
	            this.helper.unhookChild(child);
	            UnlimitedFreeformFigure.superclass.remove.call(this, child);
	        },
	        removeFreeformListener: function(listener) {
	            this.removeListener("FreeformListener", listener);
	        },
	        setFreeformBounds: function(bounds) {
	            this.helper.setFreeformBounds(bounds);
	        },
	        getBackground: function() {
	            return this._background;
	        },
	        setBackgound: function(bg) {
	            this._background = bg;
	        },
	        paintFigure: function(graphics) {
	            //graphics.fillText("UnlimitedFreeformFigure  bg:"+this._background,this._backgroundPadding,this._backgroundPadding);
	            UnlimitedFreeformFigure.superclass.paintFigure.call(this, graphics);
	            //
	            var bounds = this.getBounds();

	            //------for debug
	            graphics.saveState();
	            graphics.setFillStyle('#ddd');
	            graphics.fillRect(bounds.x, bounds.y, bounds.width, bounds.height);
	            graphics.restoreState();
	            //-------

	            if (this._background != null) {
	                throw 'unsurppoted';
	                //COM.gef.ImageHelper.draw(this._background, this._backgroundPadding, graphics, bounds.x, bounds.y, bounds.width, bounds.height);
	            }
	        },
	        pictureLoaded: function() {
	            this.revalidate();
	            this.erase();
	            this.repaint();
	        },
	        getX: function() {
	            return this.getBounds().x;
	        },
	        getY: function() {
	            return this.getBounds().y;
	        },
	        getWidth: function() {
	            return this.getBounds().width;
	        },
	        getHeight: function() {
	            return this.getBounds().height;
	        }

	    });

	    return UnlimitedFreeformFigure;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 193 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-13
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(158)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractGraphicalEditPart) {
	    'use strict';

	    var AbstractNodeEditPart = function() {
	        AbstractNodeEditPart.superclass.constructor.call(this);

	    };

	    //static properties
	    util.defineClass(AbstractNodeEditPart, AbstractGraphicalEditPart, {
	        getSourceConnectionAnchor: function(connection) {

	        },
	        getTargetConnectionAnchor: function(connection) {

	        },
	        getSourceConnectionAnchorByRequest: function(req) {

	        },
	        getTargetConnectionAnchorByRequest: function(req) {

	        }
	    });

	    return AbstractNodeEditPart;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 194 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-12
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(161),
	    __webpack_require__(158),
	    __webpack_require__(130),
	    __webpack_require__(193),
	    __webpack_require__(88),
	    __webpack_require__(9),
	    __webpack_require__(99),
	    __webpack_require__(93)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    SelectEditPartTracker,
	    AbstractGraphicalEditPart,
	    LayerConstants,
	    AbstractNodeEditPart,
	    XYAnchor,
	    Point,
	    PolylineConnection,
	    ChopboxAnchor
	) {
	    'use strict';

	    var AbstractConnectionEditPart = function() {
	        AbstractConnectionEditPart.superclass.constructor.call(this);
	        this.sourceEditPart = null;
	        this.targetEditPart = null;

	    };

	    //static properties
	    AbstractConnectionEditPart.DEFAULT_SOURCE_ANCHOR = new XYAnchor(new Point(10, 10));
	    AbstractConnectionEditPart.DEFAULT_TARGET_ANCHOR = new XYAnchor(new Point(100, 100));

	    util.defineClass(AbstractConnectionEditPart, AbstractGraphicalEditPart, {
	        activateFigure: function() {
	            this.getLayer(LayerConstants.CONNECTION_LAYER).add(this.getFigure());
	        },
	        addNotify: function() {
	            this.activateFigure();
	            AbstractConnectionEditPart.superclass.addNotify.call(this);
	        },
	        createFigure: function() {
	            return new PolylineConnection();
	        },
	        deactivateFigure: function() {
	            this.getLayer(LayerConstants.CONNECTION_LAYER).remove(this.getFigure());
	            this.getConnectionFigure().setSourceAnchor(null);
	            this.getConnectionFigure().setTargetAnchor(null);
	        },
	        getDragTracker: function(req) {
	            return new SelectEditPartTracker(this);
	        },
	        getSource: function() {
	            return this.sourceEditPart;
	        },
	        getTarget: function() {
	            return this.targetEditPart;
	        },
	        getSourceConnectionAnchor: function() {
	            if (this.getSource() != null) {
	                if (util.isInstanceOf(this.getSource(), AbstractNodeEditPart)) {
	                    var editPart = this.getSource();
	                    return editPart.getSourceConnectionAnchor(this);
	                }
	                var f = (this.getSource()).getFigure();
	                return new ChopboxAnchor(f);
	            }
	            return AbstractConnectionEditPart.DEFAULT_SOURCE_ANCHOR;
	        },
	        getTargetConnectionAnchor: function() {
	            if (this.getTarget() != null) {
	                if (util.isInstanceOf(this.getTarget(), AbstractNodeEditPart)) {
	                    var editPart = this.getTarget();
	                    return editPart.getTargetConnectionAnchor(this);
	                }
	                var f = (this.getTarget()).getFigure();
	                return new ChopboxAnchor(f);
	            }
	            return AbstractConnectionEditPart.DEFAULT_TARGET_ANCHOR;
	        },
	        refresh: function() {
	            this.refreshSourceAnchor();
	            this.refreshTargetAnchor();
	            AbstractConnectionEditPart.superclass.refresh.call(this);
	        },
	        refreshSourceAnchor: function() {
	            this.getConnectionFigure().setSourceAnchor(this.getSourceConnectionAnchor());
	        },
	        refreshTargetAnchor: function() {
	            this.getConnectionFigure().setTargetAnchor(this.getTargetConnectionAnchor());
	        },
	        getConnectionFigure: function() {
	            return this.getFigure();
	        },
	        removeNotify: function() {
	            this.deactivateFigure();
	            AbstractConnectionEditPart.superclass.removeNotify.call(this);
	        },
	        setParent: function(parent) {
	            var wasNull = this.getParent() == null;
	            var becomingNull = parent == null;
	            if (becomingNull && !wasNull) {
	                this.removeNotify();
	            }
	            AbstractConnectionEditPart.superclass.setParent.call(this, parent);
	            if (wasNull && !becomingNull) {
	                this.addNotify();
	            }
	        },
	        setSource: function(editPart) {
	            if (this.sourceEditPart == editPart) {
	                return;
	            }
	            this.sourceEditPart = editPart;
	            if (this.sourceEditPart != null) {
	                this.setParent(this.sourceEditPart.getRoot());
	            } else if (this.getTarget() == null) {
	                this.setParent(null);
	            }
	            if (this.sourceEditPart != null && this.targetEditPart != null) {
	                this.refresh();
	            }
	        },
	        setTarget(editPart) {
	            if (this.targetEditPart == editPart) {
	                return;
	            }
	            this.targetEditPart = editPart;
	            if (editPart != null) {
	                this.setParent(editPart.getRoot());
	            } else if (this.getSource() == null) {
	                this.setParent(null);
	            }
	            if (this.sourceEditPart != null && this.targetEditPart != null) {
	                this.refresh();
	            }
	        }
	    });

	    return AbstractConnectionEditPart;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 195 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-18
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(150)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, LocationRequest) {
	    'use strict';

	    var BendpointRequest = function() {
	        BendpointRequest.superclass.constructor.call(this);
	        this.index = null;
	        this.source = null;
	    };

	    //static properties
	    util.defineClass(BendpointRequest, LocationRequest, {
	        getIndex: function() {
	            return this.index;
	        },
	        getSource: function() {
	            return this.source;
	        },
	        setIndex: function(i) {
	            this.index = i;
	        },
	        setSource(s) {
	            this.source = s;
	        }
	    });

	    return BendpointRequest;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 196 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(141),
	    __webpack_require__(140)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Request, RequestConstants) {
	    'use strict';

	    var CreateRequest = function(type) {
	        if (type == null) {
	            type = RequestConstants.REQ_CREATE;
	        }
	        CreateRequest.superclass.constructor.call(this, type);
	        this.newObject = null;
	        this.size = null;
	        this.location = null;
	        this.creationFactory = null;
	        // this.creationType = null;
	    };

	    //static properties 

	    util.defineClass(CreateRequest, Request, {
	        getFactory: function() {
	            return this.creationFactory;
	        },
	        getLocation: function() {
	            return this.location;
	        },
	        getNewObject: function() {
	            if (this.newObject == null) {
	                if (this.getFactory() == null) {
	                    throw ("createRequest has no creationFactiory");
	                }
	                this.newObject = this.getFactory().getNewObject();
	            }
	            return this.newObject;
	        },
	        getNewObjectType: function() {
	            if (this.getFactory() == null) {
	                throw ("createRequest has no creationFactiory");
	            }
	            return this.getFactory().getObjectType();
	        },
	        getSize: function() {
	            return this.size;
	        },
	        setFactory: function(factory) {
	            this.creationFactory = factory;
	        },
	        setLocation: function(location) {
	            this.location = location;
	        },
	        setSize: function(size) {
	            this.size = size;
	        }

	    });

	    return CreateRequest;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 197 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-18
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(196)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, CreateRequest) {
	    'use strict';

	    var CreateConnectionRequest = function() {
	        CreateConnectionRequest.superclass.constructor.call(this);
	        this.startCommand = null;
	        this.targetEditPart = null;
	        this.sourceEditPart = null;

	    };

	    //static properties
	    util.defineClass(CreateConnectionRequest, CreateRequest, {
	        getSourceEditPart: function() {
	            return this.sourceEditPart;
	        },
	        getTargetEditPart: function() {
	            return this.targetEditPart;
	        },
	        getStartCommand: function() {
	            return this.startCommand;
	        },
	        setSourceEditPart: function(part) {
	            this.sourceEditPart = part;
	        },
	        setTargetEditPart: function(part) {
	            this.targetEditPart = part;
	        },
	        setStartCommand: function(c) {
	            this.startCommand = c;
	        }
	    });

	    return CreateConnectionRequest;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 198 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-20
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(150),
	    __webpack_require__(140)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, LocationRequest, RequestConstants) {
	    'use strict';

	    var ReconnectRequest = function(type) {
	        ReconnectRequest.superclass.constructor.call(this, type);
	        this.connection = null;
	        this.target = null;
	        this.setType(type);
	    };

	    //static properties
	    util.defineClass(ReconnectRequest, LocationRequest, {
	        getConnectionEditPart: function() {
	            return this.connection;
	        },
	        getTarget: function() {
	            return this.target;
	        },
	        isMovingStartAnchor() {
	            return RequestConstants.REQ_RECONNECT_SOURCE == (this.getType());
	        },
	        setConnectionEditPart: function(conn) {
	            this.connection = conn;
	        },
	        setTargetEditPart: function(ep) {
	            this.target = ep;
	        }
	    });

	    return ReconnectRequest;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 199 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(141),
	    __webpack_require__(140)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, Request, RequestConstants) {
	    'use strict';

	    var MarqueeSelectionRequest = function(type) {
	        if (type == null) {
	            type = RequestConstants.REQ_SELECTION;
	        }
	        MarqueeSelectionRequest.superclass.constructor.call(this, type);
	        this.location = null;
	        this.size = null;
	    };

	    //static properties


	    util.defineClass(MarqueeSelectionRequest, Request, {
	        getSize: function() {
	            return this.size;
	        },
	        getLocation: function() {
	            return this.location;
	        },
	        setSize: function(size) {
	            this.size = size;
	        },
	        setLocation: function(loc) {
	            this.location = loc;
	        }
	    });

	    return MarqueeSelectionRequest;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 200 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-18
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(183),
	    __webpack_require__(195)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, SimpleDragTracker, BendpointRequest) {
	    'use strict';

	    var ConnectionBendpointTracker = function(editpart, i) {
	        ConnectionBendpointTracker.superclass.constructor.call(this);
	        this.type = null;
	        this.editpart = null;
	        this.index = null;
	        this.setConnectionEditPart(editpart);
	        this.setIndex(i);
	    };

	    //static properties
	    util.defineClass(ConnectionBendpointTracker, SimpleDragTracker, {
	        createOperationSet: function() {
	            var list = [];
	            list.push(this.getConnectionEditPart());
	            return list;
	        },
	        createSourceRequest: function() {
	            var request = new BendpointRequest();
	            request.setType(this.getType());
	            request.setIndex(this.getIndex());
	            request.setSource(this.getConnectionEditPart());
	            return request;
	        },
	        getCommand: function() {
	            return this.getConnectionEditPart().getCommand(this.getSourceRequest());
	        },
	        getCommandName: function() {
	            return this.getType().toString();
	        },
	        getConnection: function() {
	            return this.getConnectionEditPart().getFigure();
	        },
	        getConnectionEditPart: function() {
	            return this.editpart;
	        },
	        getDebugName: function() {
	            return "Bendpoint Handle Tracker " + this.getCommandName();
	        },
	        getIndex: function() {
	            return this.index;
	        },
	        getType: function() {
	            return this.type;
	        },
	        setConnectionEditPart(cep) {
	            this.editpart = cep;
	        },
	        setIndex: function(i) {
	            this.index = i;
	        },
	        setType: function(type) {
	            this.type = type;
	        },
	        updateSourceRequest: function() {
	            var request = this.getSourceRequest();
	            request.setLocation(this.getLocation());
	        }
	    });

	    return ConnectionBendpointTracker;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 201 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(147),
	    __webpack_require__(177),
	    __webpack_require__(129),
	    __webpack_require__(199),
	    __webpack_require__(12),
	    __webpack_require__(202),
	    __webpack_require__(127),
	    __webpack_require__(194),
	    __webpack_require__(158)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    AbstractTool,
	    RectangleFeedback,
	    EditPart,
	    MarqueeSelectionRequest,
	    Rectangle,
	    EditPartUtilities,
	    KeyStroke,
	    AbstractConnectionEditPart,
	    AbstractGraphicalEditPart
	) {
	    'use strict';

	    var MarqueeSelectionTool = function() {
	        MarqueeSelectionTool.superclass.constructor.call(this);

	        this.marqueeBehavior = MarqueeSelectionTool.DEFAULT_MARQUEE_BEHAVIOR;
	        this.marqueeRectangleFigure = null;
	        this.mode = null;
	        this.selectedEditParts = null;
	        this.targetRequest = null;
	        //setDefaultCursor(Cursor.NO);
	        this.setUnloadWhenFinished(false);
	    };

	    //static properties

	    MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED_OR_CONNECTIONS_TOUCHED = 8;
	    MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED_OR_CONNECTIONS_CONTAINED = 7;
	    MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_CONTAINED = 6;
	    MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_TOUCHED = 2;
	    MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED = 1;
	    MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED_AND_RELATED_CONNECTIONS = 3;
	    MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED = 4;
	    MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED_AND_RELATED_CONNECTIONS = 5;
	    MarqueeSelectionTool.BEHAVIOR_NODES_AND_CONNECTIONS = MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED_AND_RELATED_CONNECTIONS;
	    MarqueeSelectionTool.DEFAULT_MODE = 0;
	    MarqueeSelectionTool.TOGGLE_MODE = 1;
	    MarqueeSelectionTool.APPEND_MODE = 2;
	    MarqueeSelectionTool.MARQUEE_REQUEST = new MarqueeSelectionRequest();
	    MarqueeSelectionTool.PROPERTY_MARQUEE_BEHAVIOR = "marqueeBehavior";
	    MarqueeSelectionTool.DEFAULT_MARQUEE_BEHAVIOR = MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED_OR_CONNECTIONS_CONTAINED;

	    util.defineClass(MarqueeSelectionTool, AbstractTool, {
	        applyProperty: function(key, value) {
	            if (MarqueeSelectionTool.PROPERTY_MARQUEE_BEHAVIOR == key) {
	                if (typeof value === 'number') {
	                    this.setMarqueeBehavior(value);
	                }
	                return;
	            }
	            MarqueeSelectionTool.superclass.applyProperty.call(this, key, value);
	        },
	        calculateMarqueeSelectedEditParts: function(request) {
	            var marqueeSelectedEditParts = [];
	            var primary = this.calculatePrimaryMarqueeSelectedEditParts(request);
	            for (var i = 0; i < primary.length; i++) {
	                marqueeSelectedEditParts.push(primary[i]);
	            }
	            var secondary = this.calculateSecondaryMarqueeSelectedEditParts(marqueeSelectedEditParts);
	            for (var j = 0; j < secondary.length; j++) {
	                marqueeSelectedEditParts.push(secondary[j]);
	            }
	            return marqueeSelectedEditParts;
	        },
	        calculatePrimaryMarqueeSelectedEditParts: function(request) {
	            var editPartsToProcess = [];
	            if (this.marqueeBehavior != MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_CONTAINED && this.marqueeBehavior != MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_TOUCHED) {
	                util.Array.addAll(editPartsToProcess, EditPartUtilities.getAllChildren(this.getCurrentViewer().getRootEditPart()));
	            }
	            if (this.marqueeBehavior != MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED && this.marqueeBehavior != MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED) {
	                util.Array.addAll(editPartsToProcess, EditPartUtilities.getAllNestedConnectionEditParts(this.getCurrentViewer().getRootEditPart()));
	            }
	            var marqueeSelectedEditParts = [];
	            for (var i = editPartsToProcess.length - 1; i >= 0; i--) {
	                var editPart = editPartsToProcess[i];
	                if (this.isMarqueeSelectable(editPart) && this.isPrimaryMarqueeSelectedEditPart(request, editPart)) {
	                    marqueeSelectedEditParts.push(editPart);
	                }
	            }
	            return marqueeSelectedEditParts;
	        },
	        calculateSecondaryMarqueeSelectedEditParts: function(directlyMarqueeSelectedEditParts) {
	            var editPartsToProcess = [];
	            if (directlyMarqueeSelectedEditParts != null && directlyMarqueeSelectedEditParts.length > 0) {
	                for (var i = directlyMarqueeSelectedEditParts.length - 1; i >= 0; i--) {
	                    var marqueeSelectedEditPart = directlyMarqueeSelectedEditParts[i];
	                    if (marqueeSelectedEditPart != null && util.isInstanceOf(marqueeSelectedEditPart, AbstractGraphicalEditPart)) {
	                        var source = marqueeSelectedEditPart.getSourceConnections();
	                        var target = marqueeSelectedEditPart.getTargetConnections();
	                        if (source != null) {
	                            for (var j = source.length - 1; j >= 0; j--) {
	                                editPartsToProcess.push(source[j]);
	                            }
	                        }
	                        if (target != null) {
	                            for (var k = target.length - 1; k >= 0; k--) {
	                                editPartsToProcess.push(target[k]);
	                            }
	                        }
	                    }
	                }
	            }
	            var secondaryMarqueeSelectedEditParts = [];
	            if (editPartsToProcess != null && editPartsToProcess.length > 0) {
	                for (var m = editPartsToProcess.length - 1; m >= 0; m--) {
	                    var editPart = editPartsToProcess[m];
	                    if (this.isSecondaryMarqueeSelectedEditPart(directlyMarqueeSelectedEditParts, editPart)) {
	                        secondaryMarqueeSelectedEditParts.push(editPart);
	                    }
	                }
	            }
	            return secondaryMarqueeSelectedEditParts;
	        },
	        createTargetRequest: function() {
	            return MarqueeSelectionTool.MARQUEE_REQUEST;
	        },
	        deactivate: function() {
	            if (this.isInState(AbstractTool.STATE_DRAG_IN_PROGRESS)) {
	                this.eraseMarqueeFeedback();
	                this.eraseTargetFeedback();
	            }
	            MarqueeSelectionTool.superclass.deactivate.call(this);
	            this.setState(AbstractTool.STATE_TERMINAL);
	        },
	        eraseMarqueeFeedback: function() {
	            if (this.marqueeRectangleFigure != null) {
	                this.removeFeedback(this.marqueeRectangleFigure);
	                this.marqueeRectangleFigure = null;
	            }
	        },
	        eraseTargetFeedback: function() {
	            if (this.selectedEditParts == null) {
	                return;
	            }
	            for (var i = this.selectedEditParts.length - 1; i >= 0; i--) {
	                this.selectedEditParts[i].eraseTargetFeedback(this.getTargetRequest());
	            }
	        },
	        getCommandName: function() {
	            return "Marquee Tool";
	        },
	        getCurrentMarqueeSelectionRectangle: function(request) {
	            var r = new Rectangle();
	            if (request.getLocation() != null) {
	                r.setLocation(request.getLocation().x, request.getLocation().y);
	            }
	            if (request.getSize() != null) {
	                r.setSize(request.getSize().width, request.getSize().height);
	            }
	            return r;
	        },
	        getCurrentSelectionMode: function() {
	            return this.mode;
	        },
	        getMarqueeFeedbackFigure: function() {
	            if (this.marqueeRectangleFigure == null) {
	                //					var r = new RectangleFigure();
	                //					r.setFillColor(ColorConstants.blue);
	                //					r.setOutlineColor(ColorConstants.blue);
	                //TODO 可考虑使用MarqueeRectangleFigure代替,看起来好像挺高级，不知道有什么效果
	                this.marqueeRectangleFigure = new RectangleFeedback("marqueeSelect-rf");
	                this.addFeedback(this.marqueeRectangleFigure);
	            }
	            return this.marqueeRectangleFigure;
	        },
	        getTargetRequest: function() {
	            if (this.targetRequest == null) {
	                this.targetRequest = this.createTargetRequest();
	            }
	            return this.targetRequest;
	        },
	        handleButtonDown: function(button, part) {
	            if (button != 1) {
	                this.setState(AbstractTool.STATE_INVALID);
	                this.handleInvalidInput(part);
	            }
	            if (this.stateTransition(AbstractTool.STATE_INITIAL, AbstractTool.STATE_DRAG_IN_PROGRESS)) {
	                if (this.getCurrentInput().isModKeyDown(KeyStroke.CTRL)) {
	                    this.setSelectionMode(MarqueeSelectionTool.TOGGLE_MODE);
	                } else if (this.getCurrentInput().isShiftKeyDown()) {
	                    this.setSelectionMode(MarqueeSelectionTool.APPEND_MODE);
	                } else {
	                    this.setSelectionMode(MarqueeSelectionTool.DEFAULT_MODE);
	                }
	            }
	            return true;
	        },
	        handleButtonUp: function(button, part) {
	            if (this.stateTransition(AbstractTool.STATE_DRAG_IN_PROGRESS, AbstractTool.STATE_TERMINAL)) {
	                this.eraseTargetFeedback();
	                this.eraseMarqueeFeedback();
	                this.performMarqueeSelect(this.getTargetRequest());
	            }
	            this.setUnloadWhenFinished(true);
	            this.handleFinished(part);
	            return true;
	        },
	        handleDragInProgress: function(part) {
	            if (this.isInState(AbstractTool.STATE_DRAG | AbstractTool.STATE_DRAG_IN_PROGRESS)) {
	                this.updateTargetRequest();
	                this.showMarqueeFeedback(this.getTargetRequest());
	                this.eraseTargetFeedback();
	                this.selectedEditParts = this.calculateMarqueeSelectedEditParts(this.getTargetRequest());
	                this.showTargetFeedback();
	            }
	            return true;
	        },
	        handleFocusLost: function(part) {
	            if (this.isInState(AbstractTool.STATE_DRAG | AbstractTool.STATE_DRAG_IN_PROGRESS)) {
	                this.handleFinished(part);
	                return true;
	            }
	            return false;
	        },
	        handleInvalidInput: function(parts) {
	            this.eraseTargetFeedback();
	            this.eraseMarqueeFeedback();
	            return true;
	        },
	        isMarqueeSelectable: function(editPart) {
	            return editPart.getTargetEditPart(MarqueeSelectionTool.MARQUEE_REQUEST) == editPart && editPart.isSelectable();
	        },
	        isPrimaryMarqueeSelectedEditPart: function(request, editPart) {
	            var figure = editPart.getFigure();
	            var r = figure.getBounds().getCopy();
	            figure.translateToAbsolute(r);

	            var included = false;
	            var marqueeSelectionRectangle = this.getCurrentMarqueeSelectionRectangle(request);
	            if (editPart != null && (util.isInstanceOf(editPart, AbstractConnectionEditPart) /*|| util.isInstanceOf(editPart, FreelineEditPart)*/)) {
	                if (this.marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_TOUCHED ||
	                    this.marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_CONTAINED ||
	                    this.marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED_OR_CONNECTIONS_TOUCHED ||
	                    this.marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED_OR_CONNECTIONS_CONTAINED) {
	                    if (marqueeSelectionRectangle.intersects(r)) {
	                        var relMarqueeRect = Rectangle.SINGLETON;
	                        figure.translateToRelative(relMarqueeRect.setBounds(marqueeSelectionRectangle));
	                        if (this.marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_TOUCHED ||
	                            this.marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED_OR_CONNECTIONS_TOUCHED) {
	                            included = false;
	                            var paths = figure.getPoints();
	                            if (paths != null && paths.size > 0) {
	                                for (var i = paths.size - 1; i >= 0; i--) {
	                                    if (relMarqueeRect.contains(paths.getPoint(i).x, paths.getPoint(i).y)) {
	                                        included = true;
	                                        return included;
	                                    }
	                                }
	                            }
	                        } else if (this.marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_CONTAINED || this.marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED_OR_CONNECTIONS_CONTAINED) {
	                            included = true;
	                            var paths = figure.getPoints();
	                            if (paths != null && paths.size > 0) {
	                                for (var i = paths.size - 1; i >= 0; i--) {
	                                    if (!relMarqueeRect.contains(paths.getPoint(i).x, paths.getPoint(i).y)) {
	                                        included = false;
	                                        return included;
	                                    }
	                                }
	                            }
	                        }
	                    }
	                }
	            } else {
	                if (this.marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED || this.marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED_AND_RELATED_CONNECTIONS || this.marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED_OR_CONNECTIONS_TOUCHED) {
	                    included = marqueeSelectionRectangle.intersects(r);
	                } else if (this.marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED || this.marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED_AND_RELATED_CONNECTIONS || this.marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED_OR_CONNECTIONS_CONTAINED) {
	                    included = marqueeSelectionRectangle.contains(r);
	                }
	            }
	            return included;
	        },
	        isSecondaryMarqueeSelectedEditPart: function(directlyMarqueeSelectedEditParts, editPart) {
	            var included = false;
	            if ((editPart != null && util.isInstanceOf(editPart, AbstractConnectionEditPart)) && (this.marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED_AND_RELATED_CONNECTIONS || this.marqueeBehavior == MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED_AND_RELATED_CONNECTIONS)) {
	                var connection = editPart;
	                var source = connection.getSource();
	                var target = connection.getTarget();
	                var sourceIncludedInMarqueeSelection = util.Array.contains(directlyMarqueeSelectedEditParts, source);
	                var targetIncludedInMarqueeSelection = util.Array.contains(directlyMarqueeSelectedEditParts, target);

	                if (this.mode == MarqueeSelectionTool.DEFAULT_MODE) {
	                    included = sourceIncludedInMarqueeSelection && targetIncludedInMarqueeSelection;
	                } else if (this.mode == MarqueeSelectionTool.APPEND_MODE) {
	                    included = connection.getSelected() == EditPart.SELECTED_NONE && (util.Array.contains(this.getCurrentViewer().getSelection(), source) || sourceIncludedInMarqueeSelection) && (util.Array.contains(this.getCurrentViewer().getSelection(), target) || targetIncludedInMarqueeSelection);
	                } else if (this.mode == MarqueeSelectionTool.TOGGLE_MODE) {
	                    if (connection.getSelected() == EditPart.SELECTED_NONE) {
	                        included = ((source.getSelected() == EditPart.SELECTED_NONE && sourceIncludedInMarqueeSelection) || (source.getSelected() != EditPart.SELECTED_NONE && !sourceIncludedInMarqueeSelection)) && ((target.getSelected() == EditPart.SELECTED_NONE && targetIncludedInMarqueeSelection) || (target.getSelected() != EditPart.SELECTED_NONE && !targetIncludedInMarqueeSelection));
	                    } else {
	                        included = (source.getSelected() != EditPart.SELECTED_NONE && sourceIncludedInMarqueeSelection) || (target.getSelected() != EditPart.SELECTED_NONE && targetIncludedInMarqueeSelection);
	                    }
	                }
	            }
	            return included;
	        },
	        performMarqueeSelect: function(request) {
	            this.getCurrentViewer().deselectAll(true);
	            var marqueeSelectedEditParts = this.calculateMarqueeSelectedEditParts(request);
	            var editPartsToSelect = [];
	            var editPartsToDeselect = [];
	            if (marqueeSelectedEditParts != null) {
	                for (var i = marqueeSelectedEditParts.length - 1; i >= 0; i--) {
	                    var affectedEditPart = marqueeSelectedEditParts[i];
	                    if (affectedEditPart.getSelected() == EditPart.SELECTED_NONE || this.getCurrentSelectionMode() != MarqueeSelectionTool.TOGGLE_MODE) {
	                        editPartsToSelect.push(affectedEditPart);
	                    } else {
	                        editPartsToDeselect.push(affectedEditPart);
	                    }
	                }
	            }

	            if (this.getCurrentSelectionMode() != MarqueeSelectionTool.DEFAULT_MODE) {
	                if (this.getCurrentViewer().getSelection() != null) {
	                    for (var j = this.getCurrentViewer().getSelection().length - 1; j >= 0; j--) {
	                        editPartsToSelect.push(this.getCurrentViewer().selection[j]);
	                    }
	                }
	                if (editPartsToDeselect != null) {
	                    for (j = editPartsToDeselect.length - 1; j >= 0; j--) {
	                        var index = util.Array.indexOf(editPartsToSelect, editPartsToDeselect[j]);
	                        if (index != -1) {
	                            editPartsToSelect.splice(index, 1);
	                        }
	                    }
	                }
	            }
	            this.getCurrentViewer().setSelection(editPartsToSelect);
	            // if (editPartsToSelect != null && editPartsToSelect.length > 0) {
	            //     for (var k = editPartsToSelect.length - 1; k > 0; k--) {
	            //         this.getCurrentViewer().appendSelection(editPartsToSelect[k], true);
	            //     }
	            //     this.getCurrentViewer().appendSelection(editPartsToSelect[0], false);
	            // }
	        },
	        setMarqueeBehavior: function(type) {
	            if (type != MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_TOUCHED && type != MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_CONTAINED && type != MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED && type != MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED_AND_RELATED_CONNECTIONS && type != MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED && type != MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED_AND_RELATED_CONNECTIONS && type != MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED_OR_CONNECTIONS_CONTAINED) {
	                throw ("Invalid marquee behaviour specified.");
	            }
	            this.marqueeBehavior = type;
	        },
	        setSelectionMode: function(mode) {
	            this.mode = mode;
	        },
	        setViewer: function(viewer) {
	            if (viewer == this.getCurrentViewer()) {
	                return;
	            }
	            MarqueeSelectionTool.superclass.setViewer.call(this, viewer);
	            //setDefaultCursor(Cursors.NO);
	        },
	        showMarqueeFeedback: function(request) {
	            var rect = this.getCurrentMarqueeSelectionRectangle(request).getCopy();
	            this.getMarqueeFeedbackFigure().translateToRelative(rect);
	            this.getMarqueeFeedbackFigure().setBounds(rect);
	        },
	        showTargetFeedback: function() {
	            if (this.selectedEditParts == null || this.selectedEditParts.length == 0) {
	                return;
	            }
	            for (var i = this.selectedEditParts.length - 1; i >= 0; i--) {
	                var editPart = this.selectedEditParts[i];
	                editPart.showTargetFeedback(this.getTargetRequest());
	            }
	        },
	        updateTargetRequest: function() {
	            var req = this.getTargetRequest();
	            if (this.isInState(AbstractTool.STATE_DRAG_IN_PROGRESS)) {
	                var loq = this.getStartLocation();
	                var bounds = new Rectangle(loq.x, loq.y, 0, 0);
	                var delta = this.getDragMoveDelta();
	                var translated = loq.getTranslated(delta.width, delta.height);
	                bounds.union(translated.x, translated.y, 0, 0);
	                req.setSize(bounds.getSize());
	                req.setLocation(bounds.getLocation());
	            } else {
	                req.setSize(null);
	                req.setLocation(this.getLocation());
	            }
	        }

	    });

	    return MarqueeSelectionTool;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));


/***/ },
/* 202 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(158)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractGraphicalEditPart) {
	    'use strict';

	    var EditPartUtilities = {};

	    EditPartUtilities.getAllChildren = function(parentEditPart) {
	        var result = [];
	        var children = parentEditPart.getChildren();
	        if (children != null && children.length > 0) {
	            for (var i = children.length - 1; i >= 0; i--) {
	                result.push(children[i]);
	                var grandChildren = EditPartUtilities.getAllChildren(children[i]);
	                for (var j = 0; j < grandChildren.length; j++) {
	                    result.push(grandChildren[j]);
	                }
	            }
	        }
	        return result;
	    };
	    EditPartUtilities.getAllNestedConnectionEditParts = function(graphicalEditPart) {
	        var transitiveConnections = [];
	        var transitiveChildren = EditPartUtilities.getAllChildren(graphicalEditPart);
	        if (transitiveChildren != null && transitiveChildren.length > 0) {
	            for (var i = transitiveChildren.length - 1; i >= 0; i--) {
	                var child = transitiveChildren[i];
	                if (child != null && util.isInstanceOf(child, AbstractGraphicalEditPart)) {
	                    var source = child.getSourceConnections();
	                    var target = child.getTargetConnections();
	                    if (source != null && source.length > 0) {
	                        for (var j = source.length - 1; j >= 0; j--) {
	                            transitiveConnections.push(source[j]);
	                        }
	                    }
	                    if (target != null && target.length > 0) {
	                        for (var k = target.length - 1; k >= 0; k--) {
	                            transitiveConnections.push(target[k]);
	                        }
	                    }
	                }
	            }
	        }
	        return transitiveConnections;
	    };

	    EditPartUtilities.getNestedConnectionEditParts = function(graphicalEditPart) {
	        return null;
	    };

	    return EditPartUtilities;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));


/***/ },
/* 203 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(161)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, SelectEditPartTracker) {
	    'use strict';

	    var DeselectAllTracker = function() {
	        DeselectAllTracker.superclass.constructor.call(this);

	    };

	    util.defineClass(DeselectAllTracker, SelectEditPartTracker, {
	        handleButtonDown: function(button, host) {
	            this.getCurrentViewer().deselectAll();
	            return true;
	        }

	    });

	    return DeselectAllTracker;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 204 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(146),
	    __webpack_require__(196),
	    __webpack_require__(140),
	    __webpack_require__(129),
	    __webpack_require__(147),
	    __webpack_require__(12),
	    __webpack_require__(111),
	    __webpack_require__(10),
	    __webpack_require__(25)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    TargetingTool,
	    CreateRequest,
	    RequestConstants,
	    EditPart,
	    AbstractTool,
	    Rectangle,
	    Cursor,
	    Dimension,
	    Figure
	) {
	    'use strict';

	    var CreationTool = function(factory) {
	        CreationTool.superclass.constructor.call(this);
	        this.setDefaultCursor(Cursor.DEFAULT);
	        this.setDisabledCursor(Cursor.DISABLE);
	        this.setFactory(factory);
	    };

	    CreationTool.PROPERTY_CREATION_FACTORY = "factory";

	    util.defineClass(CreationTool, TargetingTool, {
	        setFactory: function(factory) {
	            this.factory = factory;
	        },
	        /**
	         * @see AbstractTool#applyProperty(Object, Object)
	         */
	        applyProperty: function(key, value) {
	            if (CreationTool.PROPERTY_CREATION_FACTORY == (key)) {
	                if (util.isInstanceOf(value, CreationFactory)) {
	                    this.setFactory(value);
	                }
	                return;
	            }
	            CreationTool.superclass.applyProperty.call(this, key, value);
	        },
	        createTargetRequest: function() {
	            var request = new CreateRequest();
	            request.setFactory(this.getFactory());
	            return request;
	        },
	        getCommandName: function() {
	            return RequestConstants.REQ_CREATE;
	        },
	        deactivate() {
	            CreationTool.superclass.deactivate.call(this);
	            // this.helper = null;
	        },
	        getCreateRequest: function() {
	            return this.getTargetRequest();
	        },
	        handleButtonDown: function(button, part) {
	            if (button != 1) {
	                this.setState(AbstractTool.STATE_INVALID);
	                this.handleInvalidInput(part);
	                return true;
	            }
	            if (this.stateTransition(AbstractTool.STATE_INITIAL, AbstractTool.STATE_DRAG)) {
	                this.getCreateRequest().setLocation(this.getLocation());
	                this.lockTargetEditPart(this.getTargetEditPart());

	                // Snap only when size on drop is employed
	                // if (getTargetEditPart() != null)
	                // 	helper = (SnapToHelper) getTargetEditPart().getAdapter(
	                // 			SnapToHelper.class);
	            }
	            return true;
	        },
	        getFactory: function() {
	            return this.factory;
	        },
	        handleButtonUp: function(button, part) {
	            if (this.stateTransition(AbstractTool.STATE_DRAG | AbstractTool.STATE_DRAG_IN_PROGRESS, AbstractTool.STATE_TERMINAL)) {
	                this.eraseTargetFeedback();
	                this.unlockTargetEditPart(part);
	                this.performCreation(button);
	            }
	            this.setState(AbstractTool.STATE_TERMINAL);
	            this.handleFinished(part);
	            return true;
	        },
	        handleDragInProgress: function(part) {
	            if (this.isInState(AbstractTool.STATE_DRAG_IN_PROGRESS)) {
	                this.updateTargetRequest();
	                this.setCurrentCommand(this.getCommand());
	                this.showTargetFeedback();
	            }
	            return true;
	        },
	        handleDragStarted: function(part) {
	            return this.stateTransition(AbstractTool.STATE_DRAG, AbstractTool.STATE_DRAG_IN_PROGRESS);
	        },
	        handleFocusLost: function(part) {
	            if (this.isInState(AbstractTool.STATE_DRAG | AbstractTool.STATE_DRAG_IN_PROGRESS)) {
	                this.eraseTargetFeedback();
	                this.setState(AbstractTool.STATE_INVALID);
	                this.handleFinished(part);
	                return true;
	            }
	            return false;
	        },
	        handleHover: function() {
	            if (this.isInState(AbstractTool.STATE_INITIAL))
	                this.updateAutoexposeHelper();
	            return true;
	        },
	        handleMove: function(part) {
	            this.updateTargetRequest();
	            this.updateTargetUnderMouse(part);
	            this.setCurrentCommand(this.getCommand());
	            this.showTargetFeedback();
	            return true;
	        },
	        performCreation: function() {
	            var viewer = this.getCurrentViewer();
	            this.executeCurrentCommand();
	            this.selectAddedObject(viewer);
	        },
	        selectAddedObject: function(viewer) {
	            var model = this.getCreateRequest().getNewObject();
	            if (model == null || viewer == null) {
	                return;
	            }
	            var editpart = viewer.getEditPartRegistry().get(model);
	            viewer.flush();
	            if (editpart != null && util.isInstanceOf(editpart, EditPart) && editpart.isSelectable()) {
	                // Force the new object to get positioned in the viewer.
	                viewer.select(editpart);
	            }
	        },
	        updateTargetRequest: function() {
	            var req = this.getCreateRequest();
	            if (this.isInState(AbstractTool.STATE_DRAG_IN_PROGRESS)) {
	                var loq = this.getStartLocation();
	                var bounds = new Rectangle(loq.x, loq.y, 0, 0);
	                var delta = this.getDragMoveDelta();
	                var translated = loq.getTranslated(delta.width, delta.height);
	                bounds.union(translated.x, translated.y, 0, 0);
	                req.setSize(bounds.getSize());
	                req.setLocation(bounds.getLocation());
	            } else {
	                req.setSize(null);
	                req.setLocation(this.getLocation());
	            }
	        },
	        enforceConstraintsForSizeOnDropCreate(request) {
	            var createRequest = this.getTargetRequest();
	            if (createRequest.getSize() != null) {
	                // ensure create request respects minimum and maximum size
	                // constraints
	                var constraint = new Rectangle(
	                    createRequest.getLocation(), createRequest.getSize());
	                this.getTargetEditPart().getContentPane()
	                    .translateToRelative(constraint);
	                constraint.setSize(Dimension.max(constraint.getSize(),
	                    this.getMinimumSizeFor(this.createRequest)));
	                constraint.setSize(Dimension.min(constraint.getSize(),
	                    this.getMaximumSizeFor(this.createRequest)));
	                this.getTargetEditPart().getContentPane()
	                    .translateToAbsolute(constraint);
	                createRequest.setSize(constraint.getSize());
	            }
	        },
	        getMaximumSizeFor: function(request) {
	            return Figure.MAX_DIMENSION;
	        },
	        getMinimumSizeFor: function(request) {
	            return Figure.MIN_DIMENSION;
	        }

	    });

	    return CreationTool;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 205 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-18
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(152),
	    __webpack_require__(147),
	    __webpack_require__(146),
	    __webpack_require__(197),
	    __webpack_require__(140)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    EditPartListener,
	    AbstractTool,
	    TargetingTool,
	    CreateConnectionRequest,
	    RequestConstants
	) {
	    'use strict';

	    var AbstractConnectionCreationTool = function(factory) {
	        AbstractConnectionCreationTool.superclass.constructor.call(this);
	        this.connectionSource = null;
	        this.factory = null;
	        this.viewer = null;

	        // this.setDefaultCursor();
	        this.setFactory(factory);
	        this.deactivationListener = new EditPartListener.Stub();
	        this.deactivationListener.partDeactivated = function(editpart) {
	            this.handleSourceDeactivated();
	        }.bind(this);
	    };

	    //static properties
	    AbstractConnectionCreationTool.STATE_CONNECTION_STARTED = AbstractTool.MAX_STATE << 1;
	    AbstractConnectionCreationTool.MAX_STATE = AbstractConnectionCreationTool.STATE_CONNECTION_STARTED;
	    AbstractConnectionCreationTool.FLAG_SOURCE_FEEDBACK = TargetingTool.MAX_FLAG << 1;
	    AbstractConnectionCreationTool.MAX_FLAG = AbstractConnectionCreationTool.FLAG_SOURCE_FEEDBACK;

	    util.defineClass(AbstractConnectionCreationTool, TargetingTool, {
	        calculateCursor: function() {
	            if (this.isInState(AbstractTool.STATE_INITIAL)) {
	                if (this.getCurrentCommand() != null)
	                    return this.getDefaultCursor();
	            }
	            return AbstractConnectionCreationTool.superclass.calculateCursor.call(this);
	        },
	        createTargetRequest: function() {
	            var req = new CreateConnectionRequest();
	            req.setFactory(this.getFactory());
	            return req;
	        },
	        deactivate: function() {
	            this.eraseSourceFeedback();
	            this.setConnectionSource(null);
	            AbstractConnectionCreationTool.superclass.deactivate.call(this);
	            this.setState(AbstractTool.STATE_TERMINAL);
	            this.viewer = null;
	        },
	        eraseSourceFeedback: function() {
	            if (!this.isShowingSourceFeedback())
	                return;
	            this.setFlag(AbstractConnectionCreationTool.FLAG_SOURCE_FEEDBACK, false);
	            if (this.connectionSource != null) {
	                this.connectionSource.eraseSourceFeedback(this.getSourceRequest());
	            }
	        },
	        getCommandName: function() {
	            if (this.isInState(AbstractConnectionCreationTool.STATE_CONNECTION_STARTED |
	                    AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS))
	                return RequestConstants.REQ_CONNECTION_END;
	            else
	                return RequestConstants.REQ_CONNECTION_START;
	        },
	        getDebugName: function() {
	            return "Connection Creation Tool";
	        },
	        getDebugNameForState: function(s) {
	            if (s == AbstractConnectionCreationTool.STATE_CONNECTION_STARTED ||
	                s == AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS) {
	                return "Connection Started"; //$NON-NLS-1$
	            }
	            return AbstractConnectionCreationTool.superclass.getDebugNameForState.call(this, s);
	        },
	        getFactory: function() {
	            return this.factory;
	        },
	        getSourceRequest: function() {
	            return this.getTargetRequest();
	        },
	        handleButtonDown: function(button) {
	            if (this.isInState(AbstractTool.STATE_INITIAL) && button == 1) {
	                this.updateTargetRequest();
	                this.updateTargetUnderMouse();
	                this.setConnectionSource(this.getTargetEditPart());
	                var command = this.getCommand();
	                this.getTargetRequest().setSourceEditPart(this.getTargetEditPart());
	                if (command != null) {
	                    this.setState(AbstractConnectionCreationTool.STATE_CONNECTION_STARTED);
	                    this.setCurrentCommand(command);
	                    this.viewer = this.getCurrentViewer();
	                }
	            }

	            if (this.isInState(AbstractTool.STATE_INITIAL) && button != 1) {
	                this.setState(AbstractTool.STATE_INVALID);
	                this.handleInvalidInput();
	            }
	            return true;
	        },
	        handleButtonUp: function(button) {
	            if (this.isInState(AbstractTool.STATE_TERMINAL | AbstractTool.STATE_INVALID))
	                this.handleFinished();
	            return true;
	        },
	        handleCommandStackChanged: function() {
	            if (!this.isInState(AbstractTool.STATE_INITIAL)) {
	                if (this.getCurrentInput().isMouseButtonDown(1))
	                    this.setState(AbstractTool.STATE_INVALID);
	                else
	                    this.setState(AbstractTool.STATE_INITIAL);
	                this.handleInvalidInput();
	                return true;
	            }
	            return false;
	        },
	        handleCreateConnection: function() {
	            this.eraseSourceFeedback();
	            var endCommand = this.getCommand();
	            this.setCurrentCommand(endCommand);
	            this.executeCurrentCommand();
	            return true;
	        },
	        handleDrag: function() {
	            if (this.isInState(AbstractConnectionCreationTool.STATE_CONNECTION_STARTED))
	                return this.handleMove();
	            return false;
	        },
	        handleDragInProgress: function() {
	            if (this.isInState(AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS))
	                return this.handleMove();
	            return false;
	        },
	        handleFocusLost: function() {
	            if (this.isInState(AbstractConnectionCreationTool.STATE_CONNECTION_STARTED)) {
	                this.eraseSourceFeedback();
	                this.eraseTargetFeedback();
	                this.setState(AbstractTool.STATE_INVALID);
	                this.handleFinished();
	            }
	            return AbstractConnectionCreationTool.superclass.handleFocusLost.call(this);
	        },
	        handleHover: function() {
	            // if (this.isInState(AbstractConnectionCreationTool.STATE_CONNECTION_STARTED))
	            // this.updateAutoexposeHelper();
	            return true;
	        },
	        handleInvalidInput: function() {
	            this.eraseSourceFeedback();
	            this.setConnectionSource(null);
	            return AbstractConnectionCreationTool.superclass.handleInvalidInput.call(this);
	        },
	        handleMove: function() {
	            if (this.isInState(AbstractConnectionCreationTool.STATE_CONNECTION_STARTED) && this.viewer != this.getCurrentViewer())
	                return false;
	            if (this.isInState(AbstractConnectionCreationTool.STATE_CONNECTION_STARTED | AbstractTool.STATE_INITIAL |
	                    AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS)) {
	                this.updateTargetRequest();
	                this.updateTargetUnderMouse();
	                this.showSourceFeedback();
	                this.showTargetFeedback();
	                this.setCurrentCommand(this.getCommand());
	            }
	            return true;
	        },
	        handleSourceDeactivated: function() {
	            this.setState(AbstractTool.STATE_INVALID);
	            this.handleInvalidInput();
	            this.handleFinished();
	        },
	        isShowingSourceFeedback: function() {
	            return this.getFlag(AbstractConnectionCreationTool.FLAG_SOURCE_FEEDBACK);
	        },
	        setConnectionSource: function(source) {
	            if (this.connectionSource != null)
	                this.connectionSource.removeEditPartListener(this.deactivationListener);
	            this.connectionSource = source;
	            if (this.connectionSource != null)
	                this.connectionSource.addEditPartListener(this.deactivationListener);
	        },
	        setFactory(factory) {
	            this.factory = factory;
	        },
	        showSourceFeedback: function() {
	            if (this.connectionSource != null) {
	                this.connectionSource.showSourceFeedback(this.getSourceRequest());
	            }
	            this.setFlag(AbstractConnectionCreationTool.FLAG_SOURCE_FEEDBACK, true);
	        },
	        updateTargetRequest: function() {
	            var request = this.getTargetRequest();
	            request.setType(this.getCommandName());
	            request.setLocation(this.getLocation());
	        }
	    });

	    return AbstractConnectionCreationTool;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 206 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-18
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(147),
	    __webpack_require__(205),
	    __webpack_require__(11),
	    __webpack_require__(127)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractTool, AbstractConnectionCreationTool, PositionConstants, KeyStroke) {
	    'use strict';

	    var ConnectionCreationTool = function(factory) {
	        ConnectionCreationTool.superclass.constructor.call(this);
	        this.setFactory(factory);
	        this.setUnloadWhenFinished(false);
	    };

	    //static properties
	    util.defineClass(ConnectionCreationTool, AbstractConnectionCreationTool, {
	        acceptConnectionFinish: function(event) {
	            return this.isInState(AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS) && event.character == 13;
	        },
	        acceptConnectionStart: function(event) {
	            return this.isInState(AbstractTool.STATE_INITIAL) && event.character == 13;
	        },
	        handleButtonDown: function(button) {
	            if (button == 1 && this.stateTransition(AbstractConnectionCreationTool.STATE_CONNECTION_STARTED,
	                    AbstractTool.STATE_TERMINAL))
	                return this.handleCreateConnection();

	            ConnectionCreationTool.superclass.handleButtonDown.call(this, button);
	            if (this.isInState(AbstractConnectionCreationTool.STATE_CONNECTION_STARTED))
	            // Fake a drag to cause feedback to be displayed immediately on
	            // mouse down.
	                this.handleDrag();
	            return true;
	        },
	        handleFocusLost: function() {
	            if (this.isInState(AbstractConnectionCreationTool.STATE_CONNECTION_STARTED |
	                    AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS)) {
	                this.eraseSourceFeedback();
	                this.eraseTargetFeedback();
	                this.setState(AbstractTool.STATE_INVALID);
	                this.handleFinished();
	            }
	            return ConnectionCreationTool.superclass.handleFocusLost.call(this);
	        },
	        handleKeyDown: function(event) {

	            if (this.acceptArrowKey(event)) {
	                var direction = 0;
	                switch (event.keyCode) {
	                    case KeyStroke.ARROW_DOWN:
	                        direction = PositionConstants.SOUTH;
	                        break;
	                    case KeyStroke.ARROW_UP:
	                        direction = PositionConstants.NORTH;
	                        break;
	                    case KeyStroke.ARROW_RIGHT:
	                        direction = this.isCurrentViewerMirrored() ? PositionConstants.WEST :
	                            PositionConstants.EAST;
	                        break;
	                    case KeyStroke.ARROW_LEFT:
	                        direction = this.isCurrentViewerMirrored() ? PositionConstants.EAST :
	                            PositionConstants.WEST;
	                        break;
	                }

	                var consumed = false;
	                if (direction != 0 && event.stateMask == 0)
	                    consumed = this.navigateNextAnchor(direction);
	                if (!consumed) {
	                    event.stateMask |= KeyStroke.CONTROL;
	                    event.stateMask &= ~KeyStroke.SHIFT;
	                    if (this.getCurrentViewer().getKeyHandler().keyPressed(event)) {
	                        this.navigateNextAnchor(0);
	                        this.updateTargetRequest();
	                        this.updateTargetUnderMouse();
	                        var command = this.getCommand();
	                        if (command != null)
	                            this.setCurrentCommand(command);
	                        return true;
	                    }
	                }
	            }

	            if (event.character == '/' || event.character == '\\') {
	                event.stateMask |= KeyStroke.CONTROL;
	                if (this.getCurrentViewer().getKeyHandler().keyPressed(event)) {
	                    this.navigateNextAnchor(0);
	                    return true;
	                }
	            }

	            if (this.acceptConnectionStart(event)) {
	                var command = this.getCommand();
	                if (command != null && command.canExecute()) {
	                    this.updateTargetUnderMouse();
	                    this.setConnectionSource(this.getTargetEditPart());
	                    this.getTargetRequest().setSourceEditPart(this.getTargetEditPart());
	                    this.setState(AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS);
	                    this.placeMouseInViewer(this.getLocation().getTranslated(6, 6));
	                }
	                return true;
	            }

	            if (this.acceptConnectionFinish(event)) {
	                var command = this.getCommand();
	                if (command != null && command.canExecute()) {
	                    this.setState(AbstractTool.STATE_INITIAL);
	                    this.placeMouseInViewer(this.getLocation().getTranslated(6, 6));
	                    this.eraseSourceFeedback();
	                    this.eraseTargetFeedback();
	                    this.setCurrentCommand(command);
	                    this.executeCurrentCommand();
	                }
	                return true;
	            }

	            return ConnectionCreationTool.superclass.handleKeyDown.call(this, event);
	        },
	        mouseWheelScrolled: function(event, viewer) {
	            if (this.isInState(AbstractTool.STATE_INITIAL | AbstractConnectionCreationTool.STATE_CONNECTION_STARTED))
	                this.performViewerMouseWheel(event, viewer);
	        },
	        navigateNextAnchor(direction) {
	            // var focus = this.getCurrentViewer().getFocusEditPart();
	            // var provider = focus.getAdapter(AccessibleAnchorProvider.class);
	            // if (provider == null)
	            // 	return false;
	            //
	            // List list;
	            // if (isInState(STATE_ACCESSIBLE_DRAG_IN_PROGRESS))
	            // 	list = provider.getTargetAnchorLocations();
	            // else
	            // 	list = provider.getSourceAnchorLocations();
	            //
	            // Point start = getLocation();
	            // int distance = Integer.MAX_VALUE;
	            // Point next = null;
	            // for (int i = 0; i < list.size(); i++) {
	            // 	Point p = (Point) list.get(i);
	            // 	if (p.equals(start)
	            // 			|| (direction != 0 && (start.getPosition(p) != direction)))
	            // 		continue;
	            // 	int d = p.getDistanceOrthogonal(start);
	            // 	if (d < distance) {
	            // 		distance = d;
	            // 		next = p;
	            // 	}
	            // }
	            //
	            // if (next != null) {
	            // 	placeMouseInViewer(next);
	            // 	return true;
	            // }
	            return false;
	        }
	    });

	    return ConnectionCreationTool;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 207 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-18
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(146),
	    __webpack_require__(147),
	    __webpack_require__(198),
	    __webpack_require__(127),
	    __webpack_require__(140),
	    __webpack_require__(11)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    TargetingTool,
	    AbstractTool,
	    ReconnectRequest,
	    KeyStroke,
	    RequestConstants,
	    PositionConstants
	) {
	    'use strict';

	    var ConnectionEndpointTracker = function(cep) {
	        ConnectionEndpointTracker.superclass.constructor.call(this);
	        this.commandName = null;
	        this.exclusionSet = null;
	        this.connectionEditPart = null;
	        this.setConnectionEditPart(cep);

	    };

	    //static properties
	    ConnectionEndpointTracker.FLAG_SOURCE_FEEBBACK = TargetingTool.MAX_FLAG << 1;
	    ConnectionEndpointTracker.MAX_FLAG = ConnectionEndpointTracker.FLAG_SOURCE_FEEBBACK;

	    util.defineClass(ConnectionEndpointTracker, TargetingTool, {
	        calculateCursor: function() {
	            if (this.isInState(AbstractTool.STATE_INITIAL | AbstractTool.STATE_DRAG | AbstractTool.STATE_ACCESSIBLE_DRAG)) {
	                return this.getDefaultCursor();
	            }
	            return ConnectionEndpointTracker.superclass.calculateCursor.call(this);
	        },

	        commitDrag: function() {
	            this.eraseSourceFeedback();
	            this.eraseTargetFeedback();
	            this.executeCurrentCommand();
	        },
	        createTargetRequest() {
	            var request = new ReconnectRequest(this.getCommandName());
	            request.setConnectionEditPart(this.getConnectionEditPart());
	            return request;
	        },
	        deactivate: function() {
	            this.eraseSourceFeedback();
	            this.getCurrentViewer().setFocus(null);
	            ConnectionEndpointTracker.superclass.deactivate.call(this);
	        },
	        eraseSourceFeedback: function() {
	            if (!this.getFlag(ConnectionEndpointTracker.FLAG_SOURCE_FEEBBACK))
	                return;
	            this.setFlag(ConnectionEndpointTracker.FLAG_SOURCE_FEEBBACK, false);
	            this.getConnectionEditPart().eraseSourceFeedback(this.getTargetRequest());
	        },
	        getCommandName: function() {
	            return this.commandName;
	        },
	        getConnection: function() {
	            return this.getConnectionEditPart().getFigure();
	        },
	        getConnectionEditPart: function() {
	            return this.connectionEditPart;
	        },
	        getDebugName: function() {
	            return "Connection Endpoint Tool";
	        },
	        getExclusionSet: function() {
	            if (this.exclusionSet == null) {
	                this.exclusionSet = [];
	                this.exclusionSet.push(this.getConnection());
	            }
	            return this.exclusionSet;
	        },
	        handleButtonUp: function(button) {
	            if (this.stateTransition(AbstractTool.STATE_DRAG_IN_PROGRESS, AbstractTool.STATE_TERMINAL)) {
	                this.eraseSourceFeedback();
	                this.eraseTargetFeedback();
	                this.executeCurrentCommand();
	            }
	            return true;
	        },
	        handleDragInProgress: function() {
	            this.updateTargetRequest();
	            this.updateTargetUnderMouse();
	            this.showSourceFeedback();
	            this.showTargetFeedback();
	            this.setCurrentCommand(this.getCommand());
	            return true;
	        },
	        handleDragStarted: function() {
	            this.stateTransition(AbstractTool.STATE_INITIAL, AbstractTool.STATE_DRAG_IN_PROGRESS);
	            return false;
	        },
	        handleHover: function() {
	            if (this.isInDragInProgress())
	                this.updateAutoexposeHelper();
	            return true;
	        },
	        handleKeyDown: function(e, part) {

	            if (this.acceptArrowKey(e)) {
	                if (this.stateTransition(AbstractTool.STATE_INITIAL, AbstractTool.STATE_ACCESSIBLE_DRAG_IN_PROGRESS)) {
	                    if (this.isTarget()) {
	                        this.getCurrentViewer().setFocusEditPart(this.getConnectionEditPart().getTarget());
	                        this.getCurrentViewer().reveal(this.getConnectionEditPart().getTarget());
	                    } else {
	                        this.getCurrentViewer().setFocusEditPart(this.getConnectionEditPart().getSource());
	                        this.getCurrentViewer().reveal(this.getConnectionEditPart().getSource());
	                    }
	                }
	                var direction = 0;
	                switch (e.keyCode) {
	                    case KeyStroke.ARROW_DOWN:
	                        direction = PositionConstants.SOUTH;
	                        break;
	                    case KeyStroke.ARROW_UP:
	                        direction = PositionConstants.NORTH;
	                        break;
	                    case KeyStroke.ARROW_RIGHT:
	                        direction = this.isCurrentViewerMirrored() ? PositionConstants.WEST : PositionConstants.EAST;
	                        break;
	                    case KeyStroke.ARROW_LEFT:
	                        direction = this.isCurrentViewerMirrored() ? PositionConstants.EAST : PositionConstants.WEST;
	                        break;
	                }
	                var consumed = false;
	                var stateMask = KeyStroke.getStatemark(e.altKey, e.ctrlKey, e.shiftKey);
	                if (direction != 0 && stateMask == 0) {
	                    consumed = this.navigateNextAnchor(direction);
	                }
	                if (!consumed) {
	                    e.ctrlKey = true;
	                    e.shiftKey = false;
	                    if (this.getCurrentViewer().getKeyHandler().keyPressed(e)) {
	                        this.navigateNextAnchor(0);
	                        return true;
	                    }
	                }
	                if (e.charCode == '/'.charCodeAt(0) || e.charCode == '\\'.charCodeAt(0)) {
	                    e.ctrlKey = true;
	                    if (this.getCurrentViewer().getKeyHandler().keyPressed(e)) {
	                        if (this.getCurrentViewer().getFocusEditPart() != this.getConnectionEditPart()) {
	                            this.navigateNextAnchor(0);
	                        }
	                        return true;
	                    }
	                }
	            }
	            return false;
	        },
	        isTarget: function() {
	            return this.getCommandName() == RequestConstants.REQ_RECONNECT_TARGET;
	        },
	        navigateNextAnchor: function(direction) {
	            //暂时不支持锚点
	            return false;
	        },
	        setCommandName: function(newCommandName) {
	            this.commandName = newCommandName;
	        },
	        setConnectionEditPart: function(cep) {
	            this.connectionEditPart = cep;
	        },
	        showSourceFeedback: function() {
	            this.getConnectionEditPart().showSourceFeedback(this.getTargetRequest());
	            this.setFlag(ConnectionEndpointTracker.FLAG_SOURCE_FEEBBACK, true);
	        },
	        updateTargetRequest: function() {
	            var request = this.getTargetRequest();
	            var p = this.getLocation();
	            request.setLocation(p);
	        }

	    });

	    return ConnectionEndpointTracker;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 208 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(147),
	    __webpack_require__(111)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractTool, Cursor) {
	    'use strict';

	    var BrowseTool = function() {
	        BrowseTool.superclass.constructor.call(this);

	        this.beginMouse = null;
	        this.beginLocation = null;
	        //this.cursMgr = CursorManager.getInstance();
	        this.curID = null;
	        this.defaultCursor = Cursor.POINTER;
	    };

	    //static properties

	    util.defineClass(BrowseTool, AbstractTool, {
	        handleButtonDown: function(button) {
	            if (button != 1) {
	                this.setState(AbstractTool.STATE_INVALID);
	                this.handleInvalidInput();
	            } else {
	                this.stateTransition(AbstractTool.STATE_INITIAL, AbstractTool.STATE_DRAG);
	            }
	            var v = this.getCurrentViewer();
	            if (v != null) {
	                //this.beginMouse = this.getLocation();

	                //beginMouse = new Point(UIComponent(v.root.figure.control).mouseX, UIComponent(v.root.figure.control).mouseY);
	                this.beginLocation = v.getRoot().getViewport().getViewLocation(); //FreeformViewport(v.root.figure).viewableRect.getLocation();

	            }
	            return true;

	        },
	        handleButtonUp: function(button) {
	            if (this.stateTransition(AbstractTool.STATE_DRAG_IN_PROGRESS, AbstractTool.STATE_TERMINAL)) {

	            }
	            this.beginLocation = null;
	            return true;
	        },
	        handleDragInProgress: function() {

	            if (this.isInState(AbstractTool.STATE_DRAG) && this.beginLocation != null) {
	                var v = this.getCurrentViewer();

	                if (v != null) {

	                    var mouse = this.getLocation();

	                    var to_x = this.beginLocation.x - (mouse.x - this.startX);
	                    var to_y = this.beginLocation.y - (mouse.y - this.startY);

	                    //TODO
	                    v.getBench().outerScrollTo(to_x, to_y);

	                }
	            }
	            return true;

	        }
	    });

	    return BrowseTool;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 209 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-20
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(180),
	    __webpack_require__(58),
	    __webpack_require__(111)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, SquareHandle, Connection, Cursor) {
	    'use strict';

	    var ConnectionHandle = function(fixed) {
	        ConnectionHandle.superclass.constructor.call(this);
	        this.fixed = false;
	        this.setFixed(fixed);
	    };

	    //static properties
	    util.defineClass(ConnectionHandle, SquareHandle, {
	        addNotify: function() {
	            ConnectionHandle.superclass.addNotify.call(this);
	            this.getConnection().addPropertyChangeListener(Connection.PROPERTY_POINTS,
	                this);
	        },
	        getConnection: function() {
	            return this.getOwnerFigure();
	        },
	        isFixed: function() {
	            return this.fixed;
	        },
	        propertyChange: function(evt) {
	            if (evt.getPropertyName() == (Connection.PROPERTY_POINTS))
	                this.revalidate();
	        },
	        removeNotify: function() {
	            this.getConnection().removePropertyChangeListener(
	                Connection.PROPERTY_POINTS, this);
	            ConnectionHandle.superclass.removeNotify.call(this);
	        },
	        setFixed: function(fixed) {
	            this.fixed = fixed;
	            if (fixed)
	                this.setCursor(Cursor.NO);
	            else
	                this.setCursor(Cursor.CROSS);
	        }
	    });

	    return ConnectionHandle;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 210 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-20
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(82),
	    __webpack_require__(140),
	    __webpack_require__(209),
	    __webpack_require__(207)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, ConnectionLocator, RequestConstants, ConnectionHandle, ConnectionEndpointTracker) {
	    'use strict';

	    var ConnectionEndpointHandle = function(owner, fixed, endPoint) {
	        if ('boolean' === typeof fixed) {
	            ConnectionEndpointHandle.superclass.constructor.call(this, fixed);
	        } else {
	            ConnectionEndpointHandle.superclass.constructor.call(this);
	            endPoint = fixed;
	        }
	        if ('number' === typeof owner) {
	            endPoint = owner;
	            this.endPoint = endPoint;
	        } else {
	            this.endPoint = endPoint;
	            this.setOwner(owner);
	            this.setLocator(new ConnectionLocator(this.getConnection(), endPoint));
	        }

	    };

	    //static properties
	    util.defineClass(ConnectionEndpointHandle, ConnectionHandle, {
	        createDragTracker: function() {
	            if (this.isFixed())
	                return null;
	            var tracker = new ConnectionEndpointTracker(this.getOwner());
	            if (this.endPoint == ConnectionLocator.SOURCE) {
	                tracker.setCommandName(RequestConstants.REQ_RECONNECT_SOURCE);
	            } else {
	                tracker.setCommandName(RequestConstants.REQ_RECONNECT_TARGET);
	            }
	            tracker.setDefaultCursor(this.getCursor());
	            return tracker;
	        },
	        getEndPoint: function() {
	            return this.endPoint;
	        }
	    });

	    return ConnectionEndpointHandle;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 211 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-20
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(209)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, ConnectionHandle) {
	    'use strict';

	    var BendpointHandle = function() {
	        BendpointHandle.superclass.constructor.call(this);
	        this.index = 0;
	    };

	    //static properties
	    util.defineClass(BendpointHandle, ConnectionHandle, {
	        createDragTracker: function() {
	            return null;
	        },
	        getIndex: function() {
	            return this.index;
	        },
	        propertyChange: function(event) {
	            this.revalidate();
	        },
	        setIndex: function(i) {
	            this.index = i;
	        }
	    });

	    return BendpointHandle;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 212 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-20
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(211),
	    __webpack_require__(200),
	    __webpack_require__(140),
	    __webpack_require__(84)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, BendpointHandle, ConnectionBendpointTracker, RequestConstants, MidpointLocator) {
	    'use strict';

	    var BendpointCreationHandle = function(owner, index, locatorIndex) {
	        BendpointCreationHandle.superclass.constructor.call(this);
	        this.setOwner(owner);
	        this.setIndex(index);
	        if ('object' === typeof locatorIndex) {
	            var locator = locatorIndex;
	            this.setLocator(locator);
	        } else {
	            this.setLocator(new MidpointLocator(this.getConnection(), (null != locatorIndex) ? locatorIndex : (index + 1)));
	        }
	    };

	    //static properties
	    util.defineClass(BendpointCreationHandle, BendpointHandle, {
	        createDragTracker: function() {
	            var tracker = new ConnectionBendpointTracker(this.getOwner(), this.getIndex());
	            tracker.setType(RequestConstants.REQ_CREATE_BENDPOINT);
	            tracker.setDefaultCursor(this.getCursor());
	            return tracker;
	        }
	    });

	    return BendpointCreationHandle;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 213 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-18
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(211),
	    __webpack_require__(200),
	    __webpack_require__(140),
	    __webpack_require__(85)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, BendpointHandle, ConnectionBendpointTracker, RequestConstants, BendpointLocator) {
	    'use strict';

	    var BendpointMoveHandle = function(owner, index, locatorIndex) {
	        BendpointMoveHandle.superclass.constructor.call(this);
	        this.setOwner(owner);
	        this.setIndex(index);
	        if ('object' === typeof locatorIndex) {
	            var locator = locatorIndex;
	            this.setLocator(locator);
	        } else {
	            this.setLocator(new BendpointLocator(this.getConnection(), (null != locatorIndex) ? locatorIndex : (index + 1)));
	        }
	    };

	    //static properties
	    util.defineClass(BendpointMoveHandle, BendpointHandle, {
	        createDragTracker: function() {
	            var tracker = new ConnectionBendpointTracker(this.getOwner(), this.getIndex());
	            tracker.setType(RequestConstants.REQ_MOVE_BENDPOINT);
	            tracker.setDefaultCursor(this.getCursor());
	            return tracker;
	        }

	    });

	    return BendpointMoveHandle;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 214 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-25
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(172),
	    __webpack_require__(140),
	    __webpack_require__(130),
	    __webpack_require__(215),
	    __webpack_require__(193),
	    __webpack_require__(99),
	    __webpack_require__(63),
	    __webpack_require__(9)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    GraphicalEditPolicy,
	    RequestConstants,
	    LayerConstants,
	    FeedbackHelper,
	    AbstractNodeEditPart,
	    PolylineConnection,
	    PolygonDecoration,
	    Point
	) {
	    'use strict';

	    var GraphicalNodeEditPolicy = function() {
	        GraphicalNodeEditPolicy.superclass.constructor.call(this);

	        this.feedbackHelper = null;
	        this.connectionFeedback = null;
	    };
	    //static properties
	    util.defineClass(GraphicalNodeEditPolicy, GraphicalEditPolicy, {
	        createDummyConnection: function(req) {
	            //return new PolylineConnection(this.getId());
	            //改为带箭头的连接线
	            var figure = new PolylineConnection();
	            figure.setTargetDecoration(new PolygonDecoration());
	            // figure.setThickness(1);
	            return figure;
	        },
	        deactivate: function() {
	            if (this.connectionFeedback != null) {
	                this.removeFeedback(this.connectionFeedback);
	                this.feedbackHelper = null;
	                this.connectionFeedback = null;
	            }
	            GraphicalNodeEditPolicy.superclass.deactivate.call(this);
	        },
	        eraseCreationFeedback: function(request) {
	            if (this.connectionFeedback != null) {
	                this.removeFeedback(this.connectionFeedback);
	                this.feedbackHelper = null;
	                this.connectionFeedback = null;
	            }
	        },
	        eraseSourceFeedback: function(request) {
	            if (RequestConstants.REQ_CONNECTION_END == (request.getType())) {
	                this.eraseCreationFeedback(request);
	            }
	        },
	        eraseTargetConnectionFeedback: Function.emptyFunction,
	        eraseTargetFeedback: function(request) {
	            if (RequestConstants.REQ_CONNECTION_START == (request.getType()) ||
	                RequestConstants.REQ_CONNECTION_END == (request.getType()) ||
	                RequestConstants.REQ_RECONNECT_SOURCE == (request.getType()) ||
	                RequestConstants.REQ_RECONNECT_TARGET == (request.getType())) {
	                this.eraseTargetConnectionFeedback(request);
	            }
	        },
	        getCommand: function(request) {
	            if (RequestConstants.REQ_CONNECTION_START == (request.getType()))
	                return this.getConnectionCreateCommand(request);
	            if (RequestConstants.REQ_CONNECTION_END == (request.getType()))
	                return this.getConnectionCompleteCommand(request);
	            if (RequestConstants.REQ_RECONNECT_TARGET == (request.getType()))
	                return this.getReconnectTargetCommand(request);
	            if (RequestConstants.REQ_RECONNECT_SOURCE == (request.getType()))
	                return this.getReconnectSourceCommand(request);

	            return null;
	        },
	        getConnectionCompleteCommand: Function.needOverride,
	        getConnectionCreateCommand: Function.needOverride,
	        getDummyConnectionRouter: function(request) {
	            return (this.getLayer(LayerConstants.CONNECTION_LAYER)).getConnectionRouter();
	        },
	        getFeedbackHelper(request) {
	            if (this.feedbackHelper == null) {
	                this.feedbackHelper = new FeedbackHelper();
	                var p = request.getLocation();
	                this.connectionFeedback = this.createDummyConnection(request);
	                this.connectionFeedback
	                    .setConnectionRouter(this.getDummyConnectionRouter(request));
	                this.connectionFeedback
	                    .setSourceAnchor(this.getSourceConnectionAnchor(request));
	                this.feedbackHelper.setConnection(this.connectionFeedback);
	                this.addFeedback(this.connectionFeedback);
	                this.feedbackHelper.update(null, p);
	            }
	            return this.feedbackHelper;
	        },
	        getReconnectTargetCommand: Function.needOverride,
	        getReconnectSourceCommand: Function.needOverride,
	        getSourceConnectionAnchor: function(request) {
	            var source = request.getSourceEditPart();
	            return (source != null && util.isInstanceOf(source, AbstractNodeEditPart)) ? source.getSourceConnectionAnchor(request) : null;
	        },
	        getTargetConnectionAnchor: function(request) {
	            var target = request.getTargetEditPart();
	            return (target != null && util.isInstanceOf(target, AbstractNodeEditPart)) ? target.getTargetConnectionAnchor(request) : null;
	        },
	        getTargetEditPart: function(request) {
	            if (RequestConstants.REQ_CONNECTION_START == (request.getType()) ||
	                RequestConstants.REQ_CONNECTION_END == (request.getType()) ||
	                RequestConstants.REQ_RECONNECT_SOURCE == (request.getType()) ||
	                RequestConstants.REQ_RECONNECT_TARGET == (request.getType()))
	                return this.getHost();
	            return null;
	        },
	        showCreationFeedback: function(request) {
	            var helper = this.getFeedbackHelper(request);
	            var p = new Point(request.getLocation());
	            helper.update(this.getTargetConnectionAnchor(request), p);
	        },
	        showSourceFeedback: function(request) {
	            if (RequestConstants.REQ_CONNECTION_END == (request.getType()))
	                this.showCreationFeedback(request);
	        },
	        showTargetConnectionFeedback: Function.emptyFunction,
	        showTargetFeedback: function(request) {
	            if (RequestConstants.REQ_CONNECTION_START == (request.getType()) ||
	                RequestConstants.REQ_CONNECTION_END == (request.getType()) ||
	                RequestConstants.REQ_RECONNECT_SOURCE == (request.getType()) ||
	                RequestConstants.REQ_RECONNECT_TARGET == (request.getType()))
	                this.showTargetConnectionFeedback(request);
	        }

	    });

	    return GraphicalNodeEditPolicy;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 215 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-20
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(88),
	    __webpack_require__(9)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, XYAnchor, Point) {
	    'use strict';

	    var FeedbackHelper = function() {
	        FeedbackHelper.superclass.constructor.call(this);
	        this.connection = null;
	        this.dummyAnchor = null;
	        this.movingStartAnchor = false;
	        this.dummyAnchor = new XYAnchor(new Point(10, 10));
	    };

	    //static properties
	    util.defineClass(FeedbackHelper, Object, {
	        getConnection: function() {
	            return this.connection;
	        },
	        isMovingStartAnchor: function() {
	            return this.movingStartAnchor;
	        },
	        setConnection: function(c) {
	            this.connection = c;
	        },
	        setMovingStartAnchor: function(value) {
	            this.movingStartAnchor = value;
	        },
	        setAnchor: function(anchor) {
	            if (this.isMovingStartAnchor())
	                this.getConnection().setSourceAnchor(anchor);
	            else
	                this.getConnection().setTargetAnchor(anchor);
	        },
	        update: function(anchor, p) {
	            if (anchor != null)
	                this.setAnchor(anchor);
	            else {
	                this.dummyAnchor.setLocation(p);
	                this.setAnchor(this.dummyAnchor);
	            }
	        }
	    });

	    return FeedbackHelper;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 216 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-5-26
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(173),
	    __webpack_require__(140)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(require, util, AbstractEditPolicy, RequestConstants) {
	    'use strict';

	    var ContainerEditPolicy = function() {
	        ContainerEditPolicy.superclass.constructor.call(this);

	    };

	    //static properties
	    util.defineClass(ContainerEditPolicy, AbstractEditPolicy, {
	        getAddCommand: Function.emptyFunction,
	        getCloneCommand: Function.emptyFunction,
	        getOrphanChildrenCommand: Function.emptyFunction,
	        getCreateCommand: Function.needOverride,
	        getCommand: function(request) {
	            if (RequestConstants.REQ_CREATE == (request.getType()))
	                return this.getCreateCommand(request);
	            if (RequestConstants.REQ_ADD == (request.getType()))
	                return this.getAddCommand(request);
	            if (RequestConstants.REQ_CLONE == (request.getType()))
	                return this.getCloneCommand(request);
	            if (RequestConstants.REQ_ORPHAN_CHILDREN == (request.getType()))
	                return this.getOrphanChildrenCommand(request);
	            return null;
	        }
	    });

	    return ContainerEditPolicy;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 217 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-18
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(187),
	    __webpack_require__(212),
	    __webpack_require__(213),
	    __webpack_require__(140),
	    __webpack_require__(129),
	    __webpack_require__(58),
	    __webpack_require__(9),
	    __webpack_require__(12),
	    __webpack_require__(14)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    SelectionHandlesEditPolicy,
	    BendpointCreationHandle,
	    BendpointMoveHandle,
	    RequestConstants,
	    EditPart,
	    Connection,
	    Point,
	    Rectangle,
	    AbsoluteBendpoint
	) {
	    'use strict';

	    var BendpointEditPolicy = function() {
	        BendpointEditPolicy.superclass.constructor.call(this);
	        this.originalConstraint = null;
	        this.isDeleting = false;

	    };

	    //static properties
	    BendpointEditPolicy.NULL_CONSTRAINT = [];
	    BendpointEditPolicy.ref1 = new Point();
	    BendpointEditPolicy.ref2 = new Point();

	    util.defineClass(BendpointEditPolicy, SelectionHandlesEditPolicy, {
	        activate: function() {
	            BendpointEditPolicy.superclass.activate.call(this);
	            this.getConnection().addPropertyChangeListener(Connection.PROPERTY_POINTS, this);
	        },
	        createHandlesForAutomaticBendpoints: function() {
	            var list = [];
	            var connEP = this.getHost();
	            var points = this.getConnection().getPoints();
	            for (var i = 0; i < points.length - 1; i++) {
	                list.push(new BendpointCreationHandle(connEP, 0, i));
	            }
	            return list;
	        },
	        createHandlesForUserBendpoints: function() {
	            var list = [];
	            var connEP = this.getHost();
	            var points = this.getConnection().getPoints();
	            var bendPoints = this.getConnection().getRoutingConstraint();
	            var bendPointIndex = 0;
	            var currBendPoint = null;
	            var bp = null;
	            if (bendPoints == null) {
	                bendPoints = [];
	            } else if (bendPoints.length != 0) {
	                bp = bendPoints[0];
	                currBendPoint = bp.getLocation();
	            }
	            for (var i = 0; i < points.size - 1; i++) {
	                list.push(new BendpointCreationHandle(connEP, bendPointIndex, i));
	                if (i < points.size - 1 && bendPointIndex < bendPoints.length && currBendPoint.equals(points.getPoint(i + 1))) {
	                    list.push(new BendpointMoveHandle(connEP, bendPointIndex, i + 1));
	                    bendPointIndex++;
	                    if (bendPointIndex < bendPoints.length) {
	                        bp = bendPoints[bendPointIndex];
	                        currBendPoint = bp.getLocation();
	                    }
	                }
	            }
	            return list;
	        },
	        createSelectionHandles: function() {
	            var list = [];
	            if (this.isAutomaticallyBending()) {
	                list = this.createHandlesForAutomaticBendpoints();
	            } else {
	                list = this.createHandlesForUserBendpoints();
	            }
	            return list;
	        },
	        deactivate: function() {
	            this.getConnection().removePropertyChangeListener(
	                Connection.PROPERTY_POINTS, this);
	            BendpointEditPolicy.superclass.deactivate.call(this);
	        },
	        eraseConnectionFeedback: function(request) {
	            this.restoreOriginalConstraint();
	            this.originalConstraint = null;
	        },
	        eraseSourceFeedback: function(request) {
	            if (RequestConstants.REQ_MOVE_BENDPOINT == (request.getType()) ||
	                RequestConstants.REQ_CREATE_BENDPOINT == (request.getType()))
	                this.eraseConnectionFeedback(request);
	        },
	        getCommand: function(request) {
	            if (RequestConstants.REQ_MOVE_BENDPOINT == (request.getType())) {
	                if (this.isDeleting) {
	                    return this.getDeleteBendpointCommand(request);
	                }
	                return this.getMoveBendpointCommand(request);
	            }
	            if (RequestConstants.REQ_CREATE_BENDPOINT == (request.getType())) {
	                return this.getCreateBendpointCommand(request);
	            }
	            return null;
	        },
	        getConnection: function() {
	            return this.getHost().getFigure();
	        },
	        getCreateBendpointCommand: util.needOverride,
	        getDeleteBendpointCommand: util.needOverride,
	        getMoveBendpointCommand: util.needOverride,
	        isAutomaticallyBending: function() {
	            var constraint = this.getConnection().getRoutingConstraint();
	            var points = this.getConnection().getPoints();
	            return ((points.length > 2) && (constraint == null || constraint.isEmpty()));
	        },
	        lineContainsPoint: function(p1, p2, p) {
	            var tolerance = 7;
	            var rect = Rectangle.SINGLETON;
	            rect.setSize(0, 0);
	            rect.setLocation(p1.x, p1.y);
	            rect.union(p2.x, p2.y);
	            rect.expand(tolerance, tolerance);
	            if (!rect.contains(p.x, p.y)) {
	                return false;
	            }

	            var v1x, v1y, v2x, v2y;
	            var numerator, denominator;
	            var result = 0;
	            if (p1.x != p2.x && p1.y != p2.y) {
	                v1x = p2.x - p1.x;
	                v1y = p2.y - p1.y;
	                v2x = p.x - p1.x;
	                v2y = p.y - p1.y;
	                numerator = v2x * v1y - v1x * v2y;
	                denominator = v1x * v1x + v1y * v1y;
	                result = ((numerator << 10) / denominator * numerator) >> 10;
	            }
	            return result <= tolerance * tolerance;
	        },
	        propertyChange: function(evt) {
	            if (this.getHost().getSelected() != EditPart.SELECTED_NONE)
	                this.addSelectionHandles();
	        },
	        restoreOriginalConstraint: function() {
	            if (this.originalConstraint != null) {
	                if (this.originalConstraint == BendpointEditPolicy.NULL_CONSTRAINT)
	                    this.getConnection().setRoutingConstraint(null);
	                else
	                    this.getConnection().setRoutingConstraint(this.originalConstraint);
	            }
	        },
	        saveOriginalConstraint: function() {
	            this.originalConstraint = this.getConnection().getRoutingConstraint();
	            if (this.originalConstraint == null)
	                this.originalConstraint = BendpointEditPolicy.NULL_CONSTRAINT;
	            this.getConnection().setRoutingConstraint(this.originalConstraint.concat());
	        },
	        setReferencePoints: function(request) {
	            var points = this.getConnection().getPoints();
	            var bpIndex = -1;
	            var bendPoints = this.getConnection().getRoutingConstraint();
	            var bp = bendPoints.get(request.getIndex()).getLocation();

	            var smallestDistance = -1;

	            // points include the bend points as well as start and end, which we may
	            // leave out when searching for the bend point index
	            for (var i = 1; i < points.length - 1; i++) {
	                if (smallestDistance == -1 ||
	                    points.getPoint(i).getDistance2(bp) < smallestDistance) {
	                    bpIndex = i;
	                    smallestDistance = points.getPoint(i).getDistance2(bp);
	                    if (smallestDistance == 0)
	                        break;
	                }
	            }

	            points.getPoint(BendpointEditPolicy.ref1, bpIndex - 1);
	            this.getConnection().translateToAbsolute(BendpointEditPolicy.ref1);
	            points.getPoint(BendpointEditPolicy.ref2, bpIndex + 1);
	            this.getConnection().translateToAbsolute(BendpointEditPolicy.ref2);
	        },
	        showCreateBendpointFeedback: function(request) {
	            var p = new Point(request.getLocation());
	            var constraint;
	            this.getConnection().translateToRelative(p);
	            var bp = new AbsoluteBendpoint(p);
	            if (this.originalConstraint == null) {
	                this.saveOriginalConstraint();
	                constraint = this.getConnection().getRoutingConstraint();
	                constraint.splice(request.getIndex(), 0, bp);
	            } else {
	                constraint = this.getConnection().getRoutingConstraint();
	            }
	            constraint[request.getIndex()] = bp;
	            this.getConnection().setRoutingConstraint(constraint);
	        },
	        showDeleteBendpointFeedback: function(request) {
	            if (this.originalConstraint == null) {
	                this.saveOriginalConstraint();
	                var constraint = this.getConnection().getRoutingConstraint();
	                constraint.splice(request.getIndex(), 1);
	                this.getConnection().setRoutingConstraint(constraint);
	            }
	        },
	        showMoveBendpointFeedback: function(request) {
	            var p = new Point(request.getLocation());
	            if (!this.isDeleting)
	                this.setReferencePoints(request);

	            if (this.lineContainsPoint(BendpointEditPolicy.ref1, BendpointEditPolicy.ref2, p)) {
	                if (!this.isDeleting) {
	                    this.isDeleting = true;
	                    this.eraseSourceFeedback(request);
	                    this.showDeleteBendpointFeedback(request);
	                }
	                return;
	            }
	            if (this.isDeleting) {
	                this.isDeleting = false;
	                this.eraseSourceFeedback(request);
	            }
	            if (this.originalConstraint == null)
	                this.saveOriginalConstraint();
	            var constraint = this.getConnection().getRoutingConstraint();
	            this.getConnection().translateToRelative(p);
	            var bp = new AbsoluteBendpoint(p);
	            constraint[request.getIndex()] = bp;
	            this.getConnection().setRoutingConstraint(constraint);
	        },
	        showSourceFeedback: function(request) {
	            if (RequestConstants.REQ_MOVE_BENDPOINT == (request.getType()))
	                this.showMoveBendpointFeedback(request);
	            else if (RequestConstants.REQ_CREATE_BENDPOINT == (request.getType()))
	                this.showCreateBendpointFeedback(request);
	        }

	    });

	    return BendpointEditPolicy;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ },
/* 218 */
/***/ function(module, exports, __webpack_require__) {

	var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**
	 * @author jiangqifan
	 * @since 2016-6-20
	 */
	!(__WEBPACK_AMD_DEFINE_ARRAY__ = [
	    __webpack_require__,
	    __webpack_require__(3),
	    __webpack_require__(187),
	    __webpack_require__(210),
	    __webpack_require__(140),
	    __webpack_require__(215),
	    __webpack_require__(193),
	    __webpack_require__(82)
	], __WEBPACK_AMD_DEFINE_RESULT__ = function(
	    require,
	    util,
	    SelectionHandlesEditPolicy,
	    ConnectionEndpointHandle,
	    RequestConstants,
	    FeedbackHelper,
	    AbstractNodeEditPart,
	    ConnectionLocator
	) {
	    'use strict';

	    var ConnectionEndpointEditPolicy = function() {
	        ConnectionEndpointEditPolicy.superclass.constructor.call(this);
	        this.originalAnchor = null;
	        this.feedbackHelper = null;

	    };

	    //static properties
	    util.defineClass(ConnectionEndpointEditPolicy, SelectionHandlesEditPolicy, {
	        createSelectionHandles: function() {
	            var list = [];
	            list.push(new ConnectionEndpointHandle(this.getHost(),
	                ConnectionLocator.SOURCE));
	            list.push(new ConnectionEndpointHandle(this.getHost(),
	                ConnectionLocator.TARGET));
	            return list;
	        },
	        eraseConnectionMoveFeedback: function(request) {
	            if (this.originalAnchor == null)
	                return;
	            if (request.isMovingStartAnchor())
	                this.getConnection().setSourceAnchor(this.originalAnchor);
	            else
	                this.getConnection().setTargetAnchor(this.originalAnchor);
	            this.originalAnchor = null;
	            this.feedbackHelper = null;
	        },
	        eraseSourceFeedback: function(request) {
	            if (RequestConstants.REQ_RECONNECT_TARGET == (request.getType()) ||
	                RequestConstants.REQ_RECONNECT_SOURCE == (request.getType()))
	                this.eraseConnectionMoveFeedback(request);
	        },
	        getCommand: function(request) {
	            return null;
	        },
	        getConnection: function() {
	            return this.getHost().getFigure();
	        },
	        getFeedbackHelper: function(request) {
	            if (this.feedbackHelper == null) {
	                this.feedbackHelper = new FeedbackHelper();
	                this.feedbackHelper.setConnection(this.getConnection());
	                this.feedbackHelper.setMovingStartAnchor(request.isMovingStartAnchor());
	            }
	            return this.feedbackHelper;
	        },
	        showConnectionMoveFeedback: function(request) {
	            var node = null;
	            if (request.getTarget() != null && util.isInstanceOf(request.getTarget(), AbstractNodeEditPart))
	                node = request.getTarget();
	            if (this.originalAnchor == null) {
	                if (request.isMovingStartAnchor())
	                    this.originalAnchor = this.getConnection().getSourceAnchor();
	                else
	                    this.originalAnchor = this.getConnection().getTargetAnchor();
	            }
	            var anchor = null;
	            if (node != null) {
	                if (request.isMovingStartAnchor())
	                    anchor = node.getSourceConnectionAnchor(request);
	                else
	                    anchor = node.getTargetConnectionAnchor(request);
	            }
	            var helper = this.getFeedbackHelper(request);
	            helper.update(anchor, request.getLocation());
	        },
	        showSourceFeedback: function(request) {
	            if (RequestConstants.REQ_RECONNECT_SOURCE == (request.getType()) ||
	                RequestConstants.REQ_RECONNECT_TARGET == (request.getType()))
	                this.showConnectionMoveFeedback(request);
	        }

	    });

	    return ConnectionEndpointEditPolicy;
	}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

/***/ }
/******/ ]);